I'm trying to follow the release branching model described at http://svnbook.red-bean.com/en/1.7/svn.branchmerge.commonpatterns.html, but on attempting to do the merge I get a merge conflict.
# Normal SVN Structure svn-testing2> ls -l total 12K drwxrwxr-x 3 xxx yyy 4.0K Jan 13 17:28 branches/ drwxrwxr-x 3 xxx yyy 4.0K Jan 13 17:28 tags/ drwxrwxr-x 3 xxx yyy 4.0K Jan 13 17:28 trunk/ # Create & commit some data svn-testing2> echo "line1" > trunk/file1; svn add trunk/file1; svn commit -m "created file1 " trunk/file1 Adding trunk/file1 Transmitting file data . Committed revision 2. # Create the release branch svn-testing2> svn copy trunk branches/release A branches/release svn-testing2> svn commit -m "created release branch" branches/release Adding branches/release Adding branches/release/file1 Committed revision 3. # Make & commit a change to trunk svn-testing2> echo "line1-file2" > trunk/file2; svn add trunk/file2; svn commit -m "created file2" trunk/file2 A trunk/file2 Adding trunk/file2 Transmitting file data . Committed revision 4. # Attempt to merge the change to trunk: svn-testing2> cd branches/release/ svn-testing2/branches/release> svn merge ^/trunk --- Merging r2 through r4 into '.': C file1 A file2 Summary of conflicts: Tree conflicts: 1 [email protected]:~/svn-testing/svn-testing2/branches/release> svn st M . C file1 > local add, incoming add upon merge A + file2
I can fix this with
svn-testing2> svn resolve --accept=working *
But it seems wrong that I have to do this.
If I then apply a "hotfix" (e.g. create "release/file3") to my release branch, how do I port that back to trunk? If I merge "release" into "trunk" it merges OK but when merging "trunk" back to "release", I get another
local add, incoming add upon merge conflict on e.g. "file3"
I'm not trying to "reintegrate" a feature branch, as these are both long running branches.
It's frustrating that the SVN redbook (which is generally excellent) describes this common branching pattern, with no worked examples of what commands to actually run!
What exactly do I need to run to follow this branching pattern without all these incorrect merge conflicts? Or are there any worked examples of this branching pattern anywhere - I can't find any!