howto suspend work

Martin Geisler mg at lazybytes.net
Wed Jun 3 16:52:42 CDT 2009


On Wed, Jun 3, 2009 at 22:16, Colin Caughie <c.caughie at indigovision.com> wrote:
>> To do this you can do a dummy-merge where you merge the two heads
>> *but* throw away all changes that come from the deadend experiment.
>> This is done as follows:
>>
>>   HGMERGE=true hg merge
>
> Ahhhh... I was trying to figure out how to do this just the other day, after someone mistakenly pushed a redundant head to the master repo.
>
> This is an extremely useful thing to be able to do; would it be an idea to add an option to the merge command to make this behaviour more accessible? Particularly on Windows where that trick doesn't work if you're using the standard command prompt.

See this page:

  http://www.selenic.com/mercurial/wiki/TipsAndTricks#mergemineortheir

where it is explained that

  hg --config ui.merge=internal:local merge

will do the merge and throw away there changes from the other head
(the one that isn't mentioned by "hg parents"). I believe the revert
step is still needed if the other changeset adds or deletes files
since those changes wont trigger a merge and so they will still be
present after the merge. Reverting everything back to the local head
will reset things properly.

-- 
Martin Geisler



More information about the Mercurial mailing list