[PATCH 0 of 5] Interactive editor merge with markers

Matt Mackall mpm at selenic.com
Thu May 13 19:02:08 CDT 2010


On Fri, 2010-05-14 at 01:44 +0200, Mads Kiilerich wrote:
> Matt Mackall wrote, On 05/13/2010 10:43 PM:
> > On Thu, 2010-05-13 at 00:30 +0200, Mads Kiilerich wrote:
> >> Why not just let internal:editor use the system editor, and leave the
> >> configuration of args and premerge to the default mergetool
> >> configuration and the user?
> >>
> >> --- a/mercurial/filemerge.py
> >> +++ b/mercurial/filemerge.py
> >> @@ -218,6 +218,8 @@
> >>            repo.wwrite(fd + ".base", fca.data(), fca.flags())
> >>            return 1 # unresolved
> >>        else:
> >> +        if tool == "internal:editor":
> >> +            toolpath = util.shellquote(ui.geteditor())
> >>            args = _toolstr(ui, tool, "args", '$local $base $other')
> >>            if "$output" in args:
> >>                out, a = a, back # read input from backup, write to original
> >>      
> > I like this.
> >    
> 
> Steve Borho pointed out that geteditor doesn't return a filename but a 
> command line fragment, so shellquote should not be used. Sorry.
> 
> >> --- a/contrib/mergetools.hgrc
> >> +++ b/contrib/mergetools.hgrc
> >> @@ -84,3 +84,8 @@
> >>    araxis.checkconflict=True
> >>    araxis.binary=True
> >>    araxis.gui=True
> >> +
> >> +internal:editor.check = conflicts, prompt
> >> +internal:editor.priority = -99
> >> +internal:editor.premerge = keep
> >> +internal:editor.args = $local
> >>      
> > I'd probably want to comment this out. We actually try to isolate people
> > from merge markers by default and people appreciate that. I'd rather
> > complain about "no merge tool" than subject people to them on their
> > first merge.
> >    
> 
> As far as I can see:
> 
> Right now the default for binaries and symlinks is internal:prompt (aka 
> "no merge tool"), and otherwise the default is plain internal:merge.
> 
> This new config will keep the default for binaries and symlinks as 
> internal:prompt, and otherwise the default is the new 
> editor-on-premerge-with-markers.

> Adding this config will thus not change the "no merge tool" experience.

Well it obviously does: it pops up an editor! If your point is that both
cases present people with RCS-era merge markers, yes, that's true. And
unfortunate.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list