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

Re: merge deleting common files

From: Richard Jones <richard.d.jones_at_imperial.ac.uk>
Date: 2006-07-24 11:57:32 CEST

Hi Andrew,

Thanks very much for your help - it looks like this is all working
exactly as I wanted it now!

> a) You need to specify a range of revisions on the SOURCE branch that
> get merged to your workset.
> b) Your workset is the TARGET branch.
> c) If you ever find yourself trying to specify the TARGET branch in
> your merge command, don't, and then refer to a & b above.
> d) You're not 'merging' in the traditional sense. Instead you are
> applying a set of changes (-r rev1:rev2) from the SOURCE branch to your
> workspace (which is the TARGET branch.)
>
> Go read the free O'Reilly Subversion book on the subversion website.

I think it was actually reading this book that got me confused (or vise
versa) ;) For the purposes of the mailing list archive, if nothing else:

The book attempts to make the process of merging less confusing by
explaining it in terms of a sophisticated diff-and-apply. Since I'd
been merging up from by Main Branch to my Feature Branch, periodically,
thus:

      r101 r151 r201
     FB +------+------+---->
        ^ ^ ^
        | | |
MB ----+------+------+---->
      r100 r150 r200

I figured that the merge operation's three arguments would be the two
revisions to diff, and the target to apply that diff to. As I'd been
merging up periodically, the difference between the branches was going
to be between FB@201 and MB@200 applied to a working copy of MB, and the
outcome was the command:

>> $ svn merge https://[repository]/branches/spiral-bib_item-status
>> https://[repository]/branches/spiral-bib

(in fact, to get around this merge problem I eventually ended up getting
Eclipse to make diffs for me that I patched the MB with ;) - which worked)

Now I've worked through your explanation I can see that I'd
over-zealously applied the diff-and-apply analogy, and that merge must
be doing some cunning things under the hood! I'd thought that using
-r101:201 would do a plain diff of those two revisions, which would in
turn cause problems when applying the changes to the MB, since they may
conflict or even revert changes in that branch.

Anyway, thanks again for the walkthrough, it was a huge help,

All the best,

-- 
Richard
-------
Richard Jones
Web and Database Technology Specialist
Imperial College London
t: +44 (0)20 759 41815
e: richard.d.jones@imperial.ac.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jul 24 11:59:11 2006

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.