using an "ours" merge strategy in hg

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Wed Nov 18 01:02:21 CST 2009


On Wed, Nov 18, 2009 at 2:52 AM, Greg Ward <greg-hg at gerg.ca> wrote:
> On Tue, Nov 17, 2009 at 10:13 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
>> I think you can use HGMERGE=internal:local for your hg merge.
>>
>> Because I can never remember that, I usually just use hg revert to
>> revert some files to one of the parents (-r. will revert to the first
>> parent).
>
> A much simpler way that I greatly prefer is
>
>  hg debugsetparents . <otherbranch>
>
> (Or <bookmark>, whatever.)
>
> If you immediately commit, that creates a "dummy merge" that has no
> diffs from the first parent (. in the above command).
>
> If you don't immediately commit, I suppose that is your opportunity to
> make whatever little changes you want to be included in the dummy
> merge.

Beware that this does not record anything at the manifest level, as
merge+revert does. Nevertheless, here's a link to quick extension for
this approach:

  http://markmail.org/thread/siews2viuirzhb7c

-parren


More information about the Mercurial mailing list