Windows: Buggy argument passing for file names with spaces
Created originally on Bitbucket by fk (Felix Krull)
It seems (on Windows at least) file names with spaces mess up the command line for at least the Meld diff tool configuration. In particular, setting the visual diff tool to Meld and trying to display a diff for a file with spaces in its name doesn't work properly:
hg init space-test
cd space-test
echo "Spaaaaaaace!" > "space test.txt"
hg add "space test.txt"
thg vdiff
Some snooping turned up that Meld received these parameters:
['C:\\Program Files (x86)\\Meld\\meld\\bin\\meld', '-a', '--label=[non-existant]@-1:000000000000', 'c:\\users\\fk\\appdata\\local\\temp\\thg.x99uui\\empty', '--label=space', 'test.txt', 'C:\\Users\\fk\\Documents\\Code\\test\\space test.txt']
Note that while the spacey file name is correct, the --label
bit is split up such that Meld 3-way-compares with a non-existent test.txt
. This is with TortoiseHg 2.9.2 (using the installer) on Windows 8.1 Pro 64-bit.