Periodically merge between trunk->branch and branch->trunk
Hello there, I have to following use-case: I'd like to create a branch from trunk and periodically merge trunk into my branch to stay up to date with what happens in trunk. At some point, the feature in my branch reaches a kind of stability that is OK for trunk, so I merge it back to trunk. The difference to the standard situation is that I want to continue working on the branch, because the feature is not completely finished, yet, or it needs further enhancement. Currently the only solution I see is to reintegrate the branch to trunk and then re-create the branch. This has the shortcoming that all developers working on the branch have to switch to the new branch (although it is the same URL) to be able to work with it, right? This is ok when I'm working alone on my branch, but with a development team, it becomes tricky to make sure that everyone properly switch to the new branch. Here's a drawing: http://dl.dropbox.com/u/1913181/Perm/Subversion-Branch-Remerge-UseCase.png Kind regards, Daniel Albuschat
RE: Periodically merge between trunk->branch and branch->trunk
Moin Daniel, > I'd like to create a branch from trunk and periodically merge trunk > into my branch to stay up to date with what happens in trunk. > At some point, the feature in my branch reaches a kind of stability > that is OK for trunk, so I merge it back to trunk. > The difference to the standard situation is that I want to continue > working on the branch, because the feature is not completely finished, > yet, or it needs further enhancement. A branch can be used after --reintegrate, but why make life more complicated? http://stackoverflow.com/questions/3309602 > Currently the only solution I see is to reintegrate the branch to > trunk and then re-create the branch. This has the shortcoming that all > developers working on the branch have to switch to the new branch > (although it is the same URL) to be able to work with it, right? It shouldn't be the same URL. Append a number you increment each time around: * branches/hubbel * branches/hubbel-2 * branches/hubbel-3 > This is ok when I'm working alone on my branch, but with a development > team, it becomes tricky to make sure that everyone properly switch to > the new branch. Subversion (or any other VC system, for that matter) cannot fully substitute inter-developer communication. Just use a mail distribution list or whatever works for you. Michael
Re: Periodically merge between trunk->branch and branch->trunk
Daniel Albuschat wrote: I'd like to create a branch from trunk and periodically merge trunk into my branch to stay up to date with what happens in trunk. At some point, the feature in my branch reaches a kind of stability that is OK for trunk, so I merge it back to trunk. The difference to the standard situation is that I want to continue working on the branch, because the feature is not completely finished, yet, or it needs further enhancement. Currently the only solution I see is to reintegrate the branch to trunk and then re-create the branch. This has the shortcoming that all developers working on the branch have to switch to the new branch (although it is the same URL) to be able to work with it, right? This is ok when I'm working alone on my branch, but with a development team, it becomes tricky to make sure that everyone properly switch to the new branch. This is covered in the book: http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.reintegratetwice -kgd
Re: Periodically merge between trunk->branch and branch->trunk
On Thu, Dec 9, 2010 at 20:27, Kris Deugau wrote: > Daniel Albuschat wrote: >> >> I'd like to create a branch from trunk and periodically merge trunk >> into my branch to stay up to date with what happens in trunk. >> At some point, the feature in my branch reaches a kind of stability >> that is OK for trunk, so I merge it back to trunk. >> The difference to the standard situation is that I want to continue >> working on the branch, because the feature is not completely finished, >> yet, or it needs further enhancement. >> Currently the only solution I see is to reintegrate the branch to >> trunk and then re-create the branch. This has the shortcoming that all >> developers working on the branch have to switch to the new branch >> (although it is the same URL) to be able to work with it, right? This >> is ok when I'm working alone on my branch, but with a development >> team, it becomes tricky to make sure that everyone properly switch to >> the new branch. > > This is covered in the book: > > http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.reintegratetwice Before going down that route, be sure to have understood the implications of issue 3650: http://subversion.tigris.org/issues/show_bug.cgi?id=3650 short summary: this technique renders `svn log --use-merge-history` useless. // Ben
Re: Periodically merge between trunk->branch and branch->trunk
On Fri, Dec 10, 2010 at 01:09:45PM +0100, B Smith-Mannschott wrote: > On Thu, Dec 9, 2010 at 20:27, Kris Deugau wrote: > > Daniel Albuschat wrote: > >> > >> I'd like to create a branch from trunk and periodically merge trunk > >> into my branch to stay up to date with what happens in trunk. > >> At some point, the feature in my branch reaches a kind of stability > >> that is OK for trunk, so I merge it back to trunk. > >> The difference to the standard situation is that I want to continue > >> working on the branch, because the feature is not completely finished, > >> yet, or it needs further enhancement. > >> Currently the only solution I see is to reintegrate the branch to > >> trunk and then re-create the branch. This has the shortcoming that all > >> developers working on the branch have to switch to the new branch > >> (although it is the same URL) to be able to work with it, right? This > >> is ok when I'm working alone on my branch, but with a development > >> team, it becomes tricky to make sure that everyone properly switch to > >> the new branch. > > > > This is covered in the book: > > > > http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.reintegratetwice > > Before going down that route, be sure to have understood the > implications of issue 3650: > http://subversion.tigris.org/issues/show_bug.cgi?id=3650 > > short summary: this technique renders `svn log --use-merge-history` useless. It's worth pointing out that this is a bug in log --use-merge-history, not in the technique. Stefan
Re: Periodically merge between trunk->branch and branch->trunk
Mon, 13 Dec 2010 07:33:07 +0100, /Daniel Albuschat/: > 2010/12/11 Stanimir Stamenkov : >> Thu, 9 Dec 2010 12:46:14 +0100, /Daniel Albuschat/: >> >>> Currently the only solution I see is to reintegrate the branch to >>> trunk and then re-create the branch. This has the shortcoming that all >>> developers working on the branch have to switch to the new branch >>> (although it is the same URL) to be able to work with it, right? >> >> No, they need just to update their working copies to the latest >> revision (now a fresh copy off trunk) of the branch. Of course >> others should no commit in between the reintegration and the branch >> re-creation. > > first, thanks for all the responses. > > I've dug thru the docs and some other web resources and came to the > same conclusion as Stanimir; > it works, basically, but you lose your history. This is, to our team, > an absolute no-go, so we will have to refrain from using this > technique. How do you exactly loose your history? > If the switch is really not needed and a normal update works, this > would be perfect. Then the only "problem" that persists is telling > every developer not commit to the branch - but that should be no > problem. > > Again, thanks for the help to everyone. -- Stanimir