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

假如想象 提交于 2019-12-22 07:48:12

问题


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?


回答1:


Look into svn:externals properties.




回答2:


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.




回答3:


Links are useful when source files should be shared between different platforms (.NET, Silverlight, .NetCF) because source files may be equal and therefor can be shared, but compiled libraries can't be shared between this platforms.



来源:https://stackoverflow.com/questions/504034/replicating-sourcesafes-link-ablity-in-svn-or-other-version-control-systems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!