09 Dec 2010, 16:03
Generic-user-small

Jason Vincent (2 posts)

Hi, I recently finished reading The Pragmatic Guide to Subversion, it was very helpful! I’m a little confused about the merging section though, and I was hoping someone could help.

Task 27 talks about rebasing a branch by reintegrating changes from the trunk into the feature branch. I was under the impression that reintegrating a branch makes it unusable for further work; wouldn’t this technique render the trunk unusable? Furthermore, it seems to be accomplishing the same thing that is described in Task 26, where changes are merged from the trunk into the branch. Which is the proper technique for updating a branch with trunk changes?

18 Dec 2010, 03:32
Generic-user-small

Mike Mason (11 posts)

Hi Jason,

We use the –reintegrate argument to pull changes from the trunk to the branch, but it doesn’t actually hurt the branch in any way. It really is rebaselining the branch and pulling the latest changes to it. In effect it tries to make it look like the branch was made much more recently, by incorporating any outstanding trunk changes. In Subversion 1.5 this did sometimes cause a problem, but as of Subversion 1.6 it should work fine.

I hope this clears things up, please post again if not and I’ll try to add more clarity.

14 Feb 2011, 18:29
Generic-user-small

Jason Vincent (2 posts)

Hi, sorry for the extremely late response. I just had a perfect, real world opportunity to test this out. One of the other developers asked me why he was getting so many tree conflicts; it was because he was reintegrating.

When I did a regular merge from the trunk into his branch, I got no tree conflicts, but when I reintegrated instead, there were 17 tree conflicts. Plus, reintegrating produced some “regular” conflicts that should not have been flagged as conflicts. Clearly the two options use different merge logic, but it seems like the regular merge produces more desirable results.

We have done several regular merges into this branch already, perhaps that caused the problems when we tried reintegrating? There must be a key difference between the two methods that I’m not understanding.

(By the way, we’re using SVN 1.6.6.)

  You must be logged in to comment