Question about internal:fail

Mike Meyer mwm at mired.org
Sun Dec 4 05:02:34 UTC 2011


On Thu, 1 Dec 2011 20:35:19 -0500
Greg Ward <greg-hg at gerg.ca> wrote:

> On Thu, Dec 1, 2011 at 6:47 PM, Mike Meyer <mwm at mired.org> wrote:
> > Right. I'm paranoid about merges. Not as paranoid as some, but
> > apparently more so than most.
> The more I read of this, the more I am convinced that you want a
> completely different manifest merge algorithm.

After poking manifestmerge ab it, I agree.

> And I'm pretty sure you
> can do what you want with an extension. Start in mercurial/merge.py.

This would be using mercurial.extensions.wrapfunction, right? Or
should I be using something else?

> You might end up concocting a better way of doing dummy merges, incidentally.

I'm hoping that will fall out of this. An extensions that causes
everything to be marked unresolved, then doing "hg resolve -a --tool
internal:local" might do the right thing. Or possibly some variant of
that. It's on the list of things to look at.

> Recall: the usual recipe for dummy merge is
> 
>   hg merge otherhead --tool internal:local
>   hg revert --all -r .
>   hg commit -m"dummy merge otherhead"
> 
> That's annoying because you still get asked "remote modified X which
> local deleted", even though you want to keep all local changes. And
> it's a two-step dance. Say your extension adds a --strategy option to
> merge; I suspect the "local" strategy (presumably equivalent to "git
> merge --strategy ours"?) would be easy to implement. Then dummy merges
> would just be
> 
>   hg merge otherhead --strategy local
>   hg commit -m"dummy merge otherhead"
> 
> No interactive questions, no need to revert. Nifty.

Well, what I want needs more than just a "local" strategy. It would
still be a three-step dance (i.e. - merge, resolve, commit), but you
could skip the interactive questions and reverting.

      Thanks,
      <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the Mercurial mailing list