SourceSafe Merges Changes, Not Branches!
June 6th, 2007 by Sameer | Filed under Visual SourceSafe.If you’ve ever had two or more source-safe projects with shared files, you might be shocked to learn that Visual SourceSafe 2005 breaks one of the holy grails of good design: user expectations. Again. (For the first incarnation of this evil act, see SourceSafe Shares Deleted Files)
You would expect that, if you merge a branched file from one project, it gets shared. I mean, you merged it, right? What was once double maintenance should become a single, unified soul. But alas, Visual SouceSafe 2005 merges changes, not branches!
To test this out, try the following:
- Create a new project (call it "Test-A")
- Add some files (some HTML or text files work best)
- Create a new project (call it "Test-B")
- Browse into Test-A, and select and drag some files into Test-B to share them
- Branch one of the shared files
- Edit the branched file in Test-B and add a line with "B: " at the prefix
- Edit the branched file in Test-A and add a line with "A: " at the prefix
- Select the branched file in Test-A, browse to the Versions menu, and click Merge Branches …
- Select the Test-B branch to merge to
- Resolve any conflicts
- Check in the file
- The file is still branched!
The only consolation you may have, is that you can delete one version and manually re-share the file (for example, by dragging and dropping the merged version into the other project folder) in order to get a real merge. But, if you have a large project with hundreds of files, set aside a few days just for merging. (Or save yourself the tedious and error-prone work by switching to Subversion, Perforce, or some other real source-control solution.)
So consider yourself warned!
By Ashiq Alibhai
By Ashiq Alibhai
