0

This shouldn't be as bad as it might sound. This is what happened:

  • Reintegrated branch into trunk
  • Deployed code
  • should have deleted branch now and recreated it from trunk but did not
  • Worked on branch some more (nothing has changed in trunk)

I got scared, however, once I read this line in the svn book:

"Once a --reintegrate merge is done from branch to trunk, the branch is no longer usable for further work."

Now I've made about 10 commits and I want to reintegrate branch into trunk again, but all sorts of tree conflicts are going to occur if I do that (I've tried a test aka dry run merge). What's the best way to recover here? Ah, I figured it out:

AlexMA
  • 9,842
  • 7
  • 42
  • 64
  • Note that --reintegrate is now deprecated and that quoted sentence in the svn book is no longer true for svn 1.8 (http://subversion.apache.org/docs/release-notes/1.8.html#auto-reintegrate) – AlexMA Jun 28 '13 at 12:49

2 Answers2

1

No pain :)

The words "not longer usable" are indeed stronger than needed. In reality they just mean that you deviate from the common workflow and need to do some additional actions.

In the end of the section you linked to, there is a link to description of keeping branch alive after reintegration: http://svnbook.red-bean.com/en/1.7/svn.branchmerge.advanced.html#svn.branchmerge.advanced.reintegratetwice

Shortly:

When you've reintegrated branch in trunk, you made a commit to trunk. This trunk commit should be merged into the branch in "record-only" mode. After this you can continue working on the branch, merge changes from trunk and reintegrate it again.

maxim1000
  • 6,297
  • 1
  • 23
  • 19
  • I did try this (after the 10 or so commits in the branch), and then tried a reintegrate to trunk and got an error message that basically said, "I see you did something stupid there, so that's as far as you go". I think I'm going to stick to branch deletion for now, especially since --reintegrate is deprecated in 1.8 (http://subversion.apache.org/docs/release-notes/1.8.html#auto-reintegrate) – AlexMA Jun 28 '13 at 12:48
  • I believe it was this: "Reintegrate can only be used if revisions xthrough y were previously merged from /path/to/trunk to the reintegrate source, but this is not the case". Like in this S/O question: http://stackoverflow.com/questions/4737605/reintegrate-can-only-be-used-if-revisions-were-previously-merged-url-to-reintegr. I actually read it before, but didn't want to mess with merge-info. – AlexMA Jun 28 '13 at 14:03
  • Then I see two potential reasons: (1) merge record for some trunk revision is missing in merge-info of the branch (2) additional merge-info in subfolders – maxim1000 Jun 28 '13 at 19:05
0

I was lucky that we don't make changes to trunk (except merge and accidental commits). All I had to do was merge the range of revisions made to branch since the last reintegrate merge into trunk. If others had been working on trunk while I had been working on dev and there were conflicts, this would have been a pain.

AlexMA
  • 9,842
  • 7
  • 42
  • 64