12

I'm currently developing an iPhone App and my company uses TFS 2010 for source control.

We're using Team Explorer Everywhere as an Eclipse plugin to handle source control on the Mac and for other projects (like a C++ project we recently did) it works fine.

However it doesn't appear to work for this iPhone App and the main reason appears to be Aliases. It either won't store them at all or it will store them as a regular file or folder, which breaks everything.

Prior to this attempt to move to TFS I was using Mercurial in an impromptu fashion and everything just worked.

Does anyone know how to store things like Aliases from a Mac OS X machine in TFS without breaking them?

Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
Tom Kidd
  • 12,830
  • 19
  • 89
  • 128
  • I'm going to upvote this just because of your C64 logo. – memmons Aug 05 '11 at 15:35
  • Can you expound on what an alias is on a Mac? A very good question +1 – LeWoody Aug 24 '11 at 15:49
  • An alias is a small file that represents another object on the file system and provides a dynamic link to it. I.e. the target object may be moved or renamed, and the alias will still link to it. In Windows, the same function is performed with a "shortcut", a file with a .lnk extension (source: http://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) – John Sibly Jan 26 '15 at 09:03

4 Answers4

5

Aliases on the Mac OS are a hybrid of a sym link as well as a pointer to the source's File ID. (think of it like a pointer to the inode as well as a sym link to the full path on a traditional unix file system)

It's actually more complicated than that since the implementation of the alias structure depends on the underlying file system. This is all documented in the Overview of the Alias Manager Reference

It really boils down to how TFS 2010 is exposing it's file store to the Mac OS - my guess is that it's a SMB share and that's why your aliases are failing to survive the translation from HFS+ to NTFS storage through a SMB API. Unless you can expose the raw storage as HFS+/AFS and TFA 2010 can intelligently track the file changes, you might be out of luck and have to avoid aliases all together. Relative path sym links might be a more robust solution if you care to try that.

You'll give up all the robustness of alias reconnection on the Mac side, but control over your code changes might be more important. I'd also look into a mercurial or git bridge to TFS 2010 as they work better on the mac and might be a more acceptable middle ground.

bmike
  • 917
  • 2
  • 22
  • 41
  • 1
    For what it's worth, Team Foundation Server is build on a web-services model and does not use SMB. The cross-platform tools for TFS (Team Explorer Everywhere) use these web services directly and do not use any sort of network filesystem. – Edward Thomson May 30 '12 at 20:23
2

Yes, Team Explorer Everywhere can preserve HFS Aliases. HFS stores Aliases in the file's extended attributes:

% ls -Flas alias
208 -rw-r--r--@ 1 ethomson  staff  69936 May 30 15:19 alias
% xattr alias
com.apple.FinderInfo
com.apple.ResourceFork

Team Explorer Everywhere will store extended attributes when the .tpattributes file is properly configured. To store extended attributes, you will need a line such as:

filename:transform=apple

When this transformation is applied, the local file's data and resource forks are combined into an AppleSingle file, which is then checked in to TFS. When you perform a get on that file from Team Explorer on another Mac computer, the Alias will be correctly preserved. On any non-Mac computer, this flag is ignored and the actual AppleSingle file itself will be downloaded.

Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
-1

The answer, near as I've been able to tell, is no.

Tom Kidd
  • 12,830
  • 19
  • 89
  • 128
-1

Not until TFS 2011 at least, according to this

stonedauwg
  • 1,328
  • 1
  • 14
  • 35
  • There is no TFS 2011, and the blog post you reference makes no mention of aliases in TFS which have been supported for many years. – Edward Thomson Feb 26 '13 at 20:47
  • There isn't a 2011 NOW, but that blog post from MS thought there would be AT THAT TIME. In that post MS themselves say extended attributes not supported yet but will be soon. Are you saying Microsoft lied? And it DOES reference it: in the section "Unix file attributes"; because as you rightly point out above, aliases are just extended file attributes. Also in your answer you state Team Explorer Everywhere, not regular TFS Server, which makes my answer valid. Thanks for the down vote though, very kind. Hope you feel better about yourself. – stonedauwg Jan 17 '14 at 22:24
  • Actually, what that blog post is saying is that the support for Unix attributes (symbolic links and execute bits, but not HFS+ aliases) would be improved in the next version Team Explorer Everywhere, which is our cross-platform client for TFS. We've had Unix filesystem attributes and Mac alias support since way back in 2005, we just wanted to make symlinks and execute bit support better, which we did in TEE 2012. – Edward Thomson Jan 17 '14 at 22:36