[PATCH] merge: when --tool is specified, disable HGMERGE by setting to empty string

Matt Mackall mpm at selenic.com
Tue Oct 19 16:25:15 CDT 2010


On Tue, 2010-10-19 at 15:39 -0500, Steve Borho wrote:
> On Tue, Oct 19, 2010 at 1:21 PM, Matt Mackall <mpm at selenic.com> wrote:
> > On Tue, 2010-10-19 at 11:13 -0500, Steve Borho wrote:
> >> On Tue, Oct 19, 2010 at 10:57 AM, Mads Kiilerich <mads at kiilerich.com> wrote:
> >> > On 10/19/2010 06:20 AM, Steve Borho wrote:
> >> >>
> >> >> # HG changeset patch
> >> >> # User Steve Borho<steve at borho.org>
> >> >> # Date 1287462014 18000
> >> >> # Node ID 096444ceebdf61e58466ad1c85bbca1019fab76b
> >> >> # Parent  ef5eaf53f4f73ee1e225f5c524cb51ed1e7bb973
> >> >> merge: when --tool is specified, disable HGMERGE by setting to empty
> >> >> string
> >> >>
> >> >> HGMERGE has different semantics than ui.merge.  HGMERGE should hold the
> >> >> name
> >> >> on an executable in your path, or an absolute tool path.  As such, it's
> >> >> not
> >> >> safe to simply copy the user's specified --tool value into HGMERGE.
> >> >>  Instead,
> >> >> we disable HGMERGE by setting it to an empty string.
> >> >
> >> > Sorry for being a bit late here ...
> >> >
> >> > My intuition - which in this case doesn't directly conflict with the help
> >> > texts - says that this option should guarantee that the specified tool is
> >> > used to merge all files that are merged, no matter what.
> >> >
> >> > But AFAICS it doesn't overrule merge-patterns? I think that one of the use
> >> > cases for this option is to overrule merge-patterns for individual files.
> >> >
> >> > I think it would be better to introduce a new 8th merge tool selection
> >> > option at the top of filemerge._picktool, rather than overloading ui.merge
> >> > and trying to patch HGMERGE.
> >>
> >> Hmm, called my bluff.   Ok, how about ui.forcemerge (not documented in
> >> hgrc(1)) that takes precedence over HGMERGE and bypasses file pattern
> >> checks?  The merge and resolve commands would need to clear the config
> >> value at their finish.
> >
> > I think we've now fully recapitulated the discussion we had on this
> > issue last time around.
> 
> I don't recall an earlier discussion on this topic.  Is a
> ui.forcemerge argument ok, or should I bite the bullet and pass the
> override down through merge.py?

forcemerge seems fine. And is more or less exactly the solution I
remember arriving at last time, though I can't find it in the archives
(would have been not long after 1.0).

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list