Fossil

View Ticket
Login
2015-02-21
15:20 Closed ticket [8d073be880]: diff/editor/gdiff settings don't support paths with spaces plus 4 other changes ... (artifact: 1cf469bf67 user: drh)
2015-02-10
19:29 Ticket [8d073be880]: 4 changes ... (artifact: 04201a7763 user: nobody)
19:19 Open ticket [8d073be880]. ... (artifact: 9178da29eb user: nobody)
2011-02-04
02:49 Ticket [995a864c5a] Editor command fails with spaces status still Open with 2 other changes ... (artifact: 0a8e44b3fe user: dmitry)
2011-02-02
14:43 New ticket [995a864c5a]. ... (artifact: 8debe85449 user: mjanssen)
2009-09-22
14:31 Ticket [3f0c73f2d2] diff-command with parameter doesn't work status still Open with 1 other change ... (artifact: 84d82e2e2f user: drh)
14:30 Ticket [3f0c73f2d2]: 1 change ... (artifact: d5959f11a3 user: drh)
2009-09-14
19:50 Ticket [8d073be880] diff/editor/gdiff settings don't support paths with spaces status still Fixed with 1 other change ... (artifact: a24ed38e9a user: drh)
18:40 Ticket [8d073be880]: 1 change ... (artifact: 93ca33fd8a user: anonymous)
2009-09-11
01:32 Ticket [8d073be880]: 1 change ... (artifact: 85c2f3f6a2 user: anonymous)
2009-09-10
23:01 Fixed ticket [8d073be880]. ... (artifact: ad62476e92 user: drh)
23:00
Add extra quoted to system() calls on windows. Ticket [8d073be8808b]. Also update to the latest SQLite. ... (check-in: aeaee1f385 user: drh tags: trunk)
21:24 New ticket [8d073be880] diff/editor/gdiff settings don't support paths with spaces. ... (artifact: 63e2b019d4 user: anonymous)

Ticket Hash: 8d073be8808beaa7b614b6d489e729dfb51ac114
Title: diff/editor/gdiff settings don't support paths with spaces
Status: Closed Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Unable_To_Reproduce
Last Modified: 2015-02-21 15:20:08
11.11 years ago
Created: 2009-09-10 21:24:08
16.56 years ago
Version Found In: dd94e596f4
Description:
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 alison.rowland@filollc.com 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.

User Comments:
nobody added on 2015-02-10 19:19:09:
Reopening issue, since this functionality don't work again. Tested on Windows. I will try to find issue myself

nobody (claiming to be kris.popov31@gmail.com) added on 2015-02-10 19:29:18:
Sorry, forgot to leave my contact data. Previous message was from me

drh added on 2015-02-21 15:20:08:

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