Fossil SCM

diff/editor/gdiff settings don't support paths with spaces

Closed

8d073be8808beaa… · opened 16 years, 7 months ago

Type
Code_Defect
Priority
Severity
Important
Resolution
Unable_To_Reproduce
Subsystem
Created
Sept. 10, 2009 9:24 p.m.

for the diff-command, gdiff-command, and editor settings, assigning a path with spaces causes failures when fossil attempts to launch the external tools. i even tried to assign the settings with quotes but they are (probably) stripped by the OS on the command line. this was observed using windows xp and powershell.

RW

PS C:\svn\rpw\Zyrain\Test> fossil setting gdiff-command "C:\Program Files\Beyond Compare 3\BComp.exe"
PS C:\svn\rpw\Zyrain\Test> fossil settings
autosync             (local)  1
diff-command
editor               (local)  C:\Program Files\JGsoft\EditPadPro6\EditPadPro.exe
gdiff-command        (local)  C:\Program Files\Beyond Compare 3\BComp.exe
http-port
localauth            (local)  0
clearsign            (local)  off
pgp-command
mtime-changes
proxy
web-browser
PS C:\svn\rpw\Zyrain\Test> fossil gdiff sct.txt
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
PS C:\svn\rpw\Zyrain\Test> fossil ver
This is fossil version [713b8be852] 2009-08-28 22:59:27 UTC

drh added on 2009-09-10 23:01:15:
Fixed by check-in [aeaee1f38512181e].


anonymous added on 2009-09-11 01:32:34:
drh - i noticed in checkin aeaee1f38512181e that you quoted the entire command for windows, including parameters. i don't think that is what you need. for example, your patch would do this for gdiff-command:

"C:\Program Files\Beyond Compare 3\BComp.exe file1.cpp file2.cpp"

the above would still result in the OS thinking that C:\Program was the command you were executing and Files\Beyond etc. is a space delimited parameter list. for commands with spaces in them, you need to quote the command and then quote any parameters with spaces in them. to be safe, you can just quote all parameters separately, so what you want is one of these:

"C:\Program Files\Beyond Compare 3\BComp.exe" file1.cpp file2.cpp
"C:\Program Files\Beyond Compare 3\BComp.exe" "file1.cpp" "file2.cpp"

anonymous claiming to be [email protected] added on 2009-09-14 18:40:57:
This is still broken under Cygwin, with the latest Fossil version ([eb1db585a5] 2009-09-14 16:56:29 UTC).


drh added on 2009-09-14 19:50:27:
I have retested and I am unable to reproduce the problem. I'm setting gdiff-command to

C:\Program Files\WinMerge\WinMergeU.exe

And then I run "gdiff" from both a cygwin shell and a regular DOS box and it works great in both cases.

Comments (3)

nobody 11 years, 2 months ago

Reopening issue, since this functionality don't work again. Tested on Windows. I will try to find issue myself

kris.popov31 11 years, 2 months ago

Sorry, forgot to leave my contact data. Previous message was from me

drh 11 years, 1 month ago

Maybe the OP needs to put double-quotes around the pathnames with spaces?

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button