Configure Mercurial for extdiff Directory Compare with vim on Windows

I'm running Mercurial from the command line on Windows XP. I've obtained the extdiff plugin. I desired

hg vimdiff

to make use of Vim is DirDiff command. I've attempted placing

cmd.vimdiff = gvim
opts.vimdiff = -f '+next' '+execute "DirDiff" argv(0) argv(1)'

In my Mercurial.ini. If I do hg vimdiff after that gvim opens up with a documents name'+next'. I assume the trouble is to do with pricing estimate and also pathnames details to windows. I've attempted a variety of permutations of backslashes and also solitary and also double quotes (not totally arbitrarily) yet without good luck.

I've addressed my trouble in the meantime by making a different script to invoke gvim i.e.

cmd.vimdiff = c:\python25\python.exe
opts.vimdiff = c:\test\

and also being

import sys
import os

os.system('gvim -c "DirDiff %s %s"' % (sys.argv[1],sys.argv[2]))

But if any person recognizes the secret necromancy to make it function straight from the command line allow me recognize and also I'll possibly attempt and also get the documents upgraded.

2022-06-07 15:15:42
Source Share
Answers: 1

The trouble is brought on by a type of bug of vim when calling a function with f - args and also the args are strings finishing with 'bkslsh'. The remedy is to remove the routing 'bkslsh' for each and every arg.

I have an even more portable remedy below:

Using vimdiff with mercurial

2022-06-08 06:06:39