Backing out merges and closing heads

Philip Pemberton philpem at philpem.me.uk
Mon May 24 22:03:48 UTC 2010


On 24/05/10 21:37, Vishakh Harikumar wrote:
 > You can use 'hg clone -r rev [-r rev..]'. This will result in a clone
 > containing all
 > the specified revisions and their ancestors. In this case 'hg clone src
 > dest -r 62 -r 59 -r 52'

I guess I need to RTFM a bit more closely. I was under the impression 
you could only specify a single rev to 'hg clone'...
If specifying '-r' only clones that rev and its ancestors, that would 
nicely explain why one of the dev branches vanished when I cloned the 
repo (the one that vanished was the last one I merged in).

 > If i understand the next part correctly, in the new clone,
 > hg up -r 59
 > hg merge -r 52
 > to keep r59 and discard all changes from r52 hg revert -a -r 59
 > mark everything as resolved 'hg resolve --all -m'
 > and commit

Huh. Again, I need to RTFM... I thought 'hg revert' would back out all 
the changes made in 'hg merge', including the fact that I was doing a merge.

Is it possible to stop 'hg merge' from firing up Kdiff3 in situations 
like this? In other words, just leave all the merges unresolved and let 
me deal with the fallout? An "I'm doing an unusual merge, leave me to 
deal with it" switch, if you will :)

 > Repeat as required for r62
 > The resulting graph will be similar, with r63&r59 and r64&r62 being
 > identical in content.

That sounds exactly like what I want.. Thanks!

-- 
Phil.
philpem at philpem.me.uk
http://www.philpem.me.uk/



More information about the Mercurial mailing list