Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replicating Sourcesafe's link ablity in SVN or other version control systems?

Currently my team uses Visual Sourcesafe, and being very familiar with how horrible the GUI is first hand and having heard the internet mummer about how unreliable it is, I've been trying to push a move to SVN.

Today I was talking to manager about the eventual move, which he supports, and he asked if it was possible to create sourcesafe style links in SVN. Links, for people not familiar with sourcesafe, work the same conceptually as file links under Linux. We use them to link shared code/libraries between projects. I explained that there was no way to create links using SVN, and he brought up that that may be a major sticking point in the migration.

I told him that in my local SVN (which I keep to ease my development, checking only periodically in sourcesafe), I place shared code/libraries in one location, and refer ANT to that location. However, I got the sense that he wasn't hugely impressed by this solution, as it adds complexity to ANT tasks. Personally I think it's worth having a slightly more complex ANT script over having a bunch of link files in source control, but it really a question of which paradigm you subscribe to.

I am curious about how developers at large work around this limitation, and do newer source control systems like Git and Mercurial support links?

like image 282
James McMahon Avatar asked Feb 02 '09 17:02

James McMahon


2 Answers

Look into svn:externals properties.

like image 146
Joel Coehoorn Avatar answered Sep 24 '22 14:09

Joel Coehoorn


We use TFS for version control, and TFS does not have the VSS links feature either. We have eliminated all of our linked files. All class files that were previously linked have been placed into class libraries which are shared to our other projects as shared project references in the solution. So in essence you share libraries, not class files.

There was a bit of an adjustment process getting used to this, but I haven't missed links since then. It really does promote a better design practice by having your code setup like this. Having the classes used in only one project helps avoid breaking changes as it is much easier to test the impact of the change (using links you may not even know if you caused a compilation issue with a change). Also some of the features of the nicer source control systems (like robust branching and merging support) work much better when you don't have to worry about linked files.

like image 39
Jim Petkus Avatar answered Sep 24 '22 14:09

Jim Petkus