[PATCH V3] extdiff: add --per-file and --confirm options

Ludovic Chabant ludovic at chabant.com
Mon Jan 28 11:38:57 EST 2019


> What I pointed out last time was that we shouldn't spawn non-GUI tools
> asynchronously. You can see the problem by the following command on Unix.
> 
>   $ hg --config extdiff.vimdiff= vimdiff -c. --per-file

Mmmh so for this I figured people would use the "--confirm" flag because, if we use the usual (blocking) process launch, there's not much difference anymore (the only difference being that the next vimdiff process launches automatically instead of the user having the press Enter). It would also prevent using this command for programs that support showing multiple diffs, usually in a tabbed way. That's how BeyondCompare works (you can batch-fire multiple processes and it will just keep opening more diff tabs in the same instance). I'm also currently coming up with a script to do this using Vim's clientserver functionality (so you run the hg command and it will open Vim with each file-diff in a tab).

I do understand however that it would be easy for users to get in a messy situation so I guess I'll add a "--batch" option to "--per-file" if that's OK?


> And perhaps, it's too late to compare ui.config value based on self._cmd
> here. If self._cmd is the key of [diff-tools] for example, we shouldn't look
> for [merge-tools].

Ah good point, thanks.

-- 
 l u d o .
 . 8 0 17 80


More information about the Mercurial-devel mailing list