mergetools: drop incorrect quoting of diffargs variables
72a89cf86fcd introduced automatic quoting of diffargs in a not entirely
backwards compatible way. That rendered some of the configuration in
mergetools.rc invalid. It would fail when running extdiff on a single file with
a name that needed quoting.
Before:
$ hg config merge-tools.meld.diffargs
-a --label='$plabel1' $parent --label='$clabel' $child
$ hg --config extdiff.meld= -v --debug meld
running "/usr/bin/meld -a --label=''sp ace@0'' '.../Z.b7a65a1d2f84/sp ace' --label=''sp ace'' '.../sp ace'" in ...
meld: error: too many arguments (wanted 0-3, got 4)
After:
$ hg config merge-tools.meld.diffargs
-a --label=$plabel1 $parent --label=$clabel $child
$ hg --config extdiff.meld= -v --debug meld
running "/usr/bin/meld -a --label='sp ace@0' '.../Z.b7a65a1d2f84/sp ace' --label='sp ace' '.../sp ace'" in ...
(success)
--- a/mercurial/default.d/mergetools.rc Wed Jan 28 22:22:59 2015 +0900
+++ b/mercurial/default.d/mergetools.rc Wed Jan 28 02:28:38 2015 +0100
@@ -7,7 +7,7 @@
kdiff3.regappend=\kdiff3.exe
kdiff3.fixeol=True
kdiff3.gui=True
-kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
+kdiff3.diffargs=--L1 $plabel1 --L2 $clabel $parent $child
gvimdiff.args=--nofork -d -g -O $local $other $base
gvimdiff.regkey=Software\Vim\GVim
@@ -28,17 +28,17 @@
meld.gui=True
meld.args=--label='local' $local --label='merged' $base --label='other' $other -o $output
meld.check=changed
-meld.diffargs=-a --label='$plabel1' $parent --label='$clabel' $child
+meld.diffargs=-a --label=$plabel1 $parent --label=$clabel $child
tkdiff.args=$local $other -a $base -o $output
tkdiff.gui=True
tkdiff.priority=-8
-tkdiff.diffargs=-L '$plabel1' $parent -L '$clabel' $child
+tkdiff.diffargs=-L $plabel1 $parent -L $clabel $child
xxdiff.args=--show-merged-pane --exit-with-merge-status --title1 local --title2 base --title3 other --merged-filename $output --merge $local $base $other
xxdiff.gui=True
xxdiff.priority=-8
-xxdiff.diffargs=--title1 '$plabel1' $parent --title2 '$clabel' $child
+xxdiff.diffargs=--title1 $plabel1 $parent --title2 $clabel $child
diffmerge.regkey=Software\SourceGear\SourceGear DiffMerge\
diffmerge.regkeyalt=Software\Wow6432Node\SourceGear\SourceGear DiffMerge\
@@ -47,7 +47,7 @@
diffmerge.args=-nosplash -merge -title1=local -title2=merged -title3=other $local $base $other -result=$output
diffmerge.check=changed
diffmerge.gui=True
-diffmerge.diffargs=--nosplash --title1='$plabel1' --title2='$clabel' $parent $child
+diffmerge.diffargs=--nosplash --title1=$plabel1 --title2=$clabel $parent $child
p4merge.args=$base $local $other $output
p4merge.regkey=Software\Perforce\Environment
@@ -70,13 +70,13 @@
tortoisemerge.check=changed
tortoisemerge.gui=True
tortoisemerge.priority=-8
-tortoisemerge.diffargs=/base:$parent /mine:$child /basename:'$plabel1' /minename:'$clabel'
+tortoisemerge.diffargs=/base:$parent /mine:$child /basename:$plabel1 /minename:$clabel
ecmerge.args=$base $local $other --mode=merge3 --title0=base --title1=local --title2=other --to=$output
ecmerge.regkey=Software\Elli\xc3\xa9 Computing\Merge
ecmerge.regkeyalt=Software\Wow6432Node\Elli\xc3\xa9 Computing\Merge
ecmerge.gui=True
-ecmerge.diffargs=$parent $child --mode=diff2 --title1='$plabel1' --title2='$clabel'
+ecmerge.diffargs=$parent $child --mode=diff2 --title1=$plabel1 --title2=$clabel
# editmerge is a small script shipped in contrib.
# It needs this config otherwise it behaves the same as internal:local
@@ -94,13 +94,13 @@
beyondcompare3.regname=ExePath
beyondcompare3.gui=True
beyondcompare3.priority=-2
-beyondcompare3.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child
+beyondcompare3.diffargs=/lro /lefttitle=$plabel1 /righttitle=$clabel /solo /expandall $parent $child
; Linux version of Beyond Compare
bcompare.args=$local $other $base -mergeoutput=$output -ro -lefttitle=parent1 -centertitle=base -righttitle=parent2 -outputtitle=merged -automerge -reviewconflicts -solo
bcompare.gui=True
bcompare.priority=-1
-bcompare.diffargs=-lro -lefttitle='$plabel1' -righttitle='$clabel' -solo -expandall $parent $child
+bcompare.diffargs=-lro -lefttitle=$plabel1 -righttitle=$clabel -solo -expandall $parent $child
winmerge.args=/e /x /wl /ub /dl other /dr local $other $local $output
winmerge.regkey=Software\Thingamahoochie\WinMerge
@@ -109,7 +109,7 @@
winmerge.check=changed
winmerge.gui=True
winmerge.priority=-10
-winmerge.diffargs=/r /e /x /ub /wl /dl '$plabel1' /dr '$clabel' $parent $child
+winmerge.diffargs=/r /e /x /ub /wl /dl $plabel1 /dr $clabel $parent $child
araxis.regkey=SOFTWARE\Classes\TypeLib\{46799e0a-7bd1-4330-911c-9660bb964ea2}\7.0\HELPDIR
araxis.regappend=\ConsoleCompare.exe
@@ -118,7 +118,7 @@
araxis.checkconflict=True
araxis.binary=True
araxis.gui=True
-araxis.diffargs=/2 /wait /title1:"$plabel1" /title2:"$clabel" $parent $child
+araxis.diffargs=/2 /wait /title1:$plabel1 /title2:$clabel $parent $child
diffuse.priority=-3
diffuse.args=$local $base $other