[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Branch management. Merge tracking.

From: Nick Patavalis <npat_at_inaccessnetworks.com>
Date: 2004-12-08 15:58:48 CET

I have this svn project

  svn://host/repo/proj/{trunk,branches,tags}

And in it the "module" (directory) mod0

  svn://host/repo/proj/trunk/mod0

Currently the repository is at revision r0. Since a lot of people are
working on mod0, and since I'm planning to do some heavy restructuring
I decide to create a branch:

  svn cp svn://host/repo/proj/trunk/mod0 \
         svn://host/repo/proj/branches/my-mod0

So the branch appears at revision r1.

Several days pass by, the restructuring of my-mod0 progresses, and at
the same time others commit minor changes to mod0 at the trunk. From
time to time, I check these trunk-changes and merge them in my branch:

  svn merge -r r7:r8 svn://host/repo/proj/trunk/mod0
  svn merge -r r12:r13 svn://host/repo/proj/trunk/mod0

  (assuming of course a working copy on the branch)

As far as I understand, once I've merged from the trunk to the branch,
I can no longer hope for a way to merge from the branch back to the
trunk; at least not without risking conflicts from the changes merged
earlier from the trunk. So practically it's "one-way" merges only:
Either you merge from branch to trunk, or the other way arround, but
not both. Am I getting something fundamentally wrong?

So I decide not to merge from branch to trunk.

After a couple of weeks latter the restructured my-mod0 is ready,
shiny and clean with the mods of the trunk merged into it. It is time
to move my-mod0 back to trunk and discontinue the branch. How do I do
it? The only way I can think off is something along these lines:

  $ cd <trunk-WC>/mod0
  $ svn merge -r HEAD:r1 svn://host/repo/proj/trunk/mod0
    (bring the trunk back to state of the initial branching)
  $ commit
  $ svn merge -r r1:HEAD svn://host/repo/proj/branches/my-mod0
  $ commit

Can I omit the intermediate "commit"? Is there a better, or
more-canonical way to do it altogether?

Thanks in advance
/npat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 8 16:04:51 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.