diff --git a/contrib/win32/mercurial.ini b/contrib/win32/mercurial.ini --- a/contrib/win32/mercurial.ini +++ b/contrib/win32/mercurial.ini @@ -71,7 +71,7 @@ editor = notepad ;cmd.bc3diff = C:\Program Files\Beyond Compare 3\BCompare.exe ;cmd.vdiff = C:\Progra~1\TortoiseSVN\bin\TortoiseMerge.exe ;cmd.vimdiff = gvim.exe -;opts.vimdiff = -f '+next' '+execute "DirDiff ".argv(0)." ".argv(1)' +;opts.vimdiff = -f "+next" "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" [hgk] diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -33,7 +33,8 @@ you do not need to type :hg:`extdiff -p # (see http://www.vim.org/scripts/script.php?script_id=102) Non # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in # your .vimrc - vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' + vimdiff = gvim -f "+next" \\ + "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" Tool arguments can include variables that are expanded at runtime:: diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -301,7 +301,8 @@ Extension module help vs command help: # (see http://www.vim.org/scripts/script.php?script_id=102) Non # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in # your .vimrc - vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' + vimdiff = gvim -f "+next" \ + "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" Tool arguments can include variables that are expanded at runtime: