Fossil SCM
diff-command with parameter doesn't work
3f0c73f2d2d08eb…
· opened 16 years, 6 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Important
- Resolution
- Fixed
- Subsystem
- —
- Created
- Sept. 22, 2009 8:43 a.m.
> fossil set diff-command 'diff -u' > fossil diff ... sh: diff -u: command not found
rwilson added on 2009-09-22 13:26:01:
this happens in windows too.
drh added on 2009-09-22 14:30:57:
This broke when I "fixed" ticket [8d073be8808b] -
diff/editor/gdiff settings don't support paths with spaces.
The fix for [8d073be8808b] was put the entire "diff" command argument
in double-quotes so that it is treated as a single entity by system().
I suppose the right solution here is to require windows people with spaces in their pathnames to add their own double-quotes around those paths. Otherwise, there is no way (that I can see) to distinguish between spaces in pathnames and separate arguments in a command.
rwilson added on 2009-09-22 18:42:22:
the problem with the windows shell is that when you quote an argument to compensate for spaces, the shell gives you the argument in argv[n] without the quotes. there doesn't seem to be a way to escape quotes in the shell. my best workaround so far is to use the DOS-style paths without spaces.
PS C:\fossil\xyntservice> fossil setting editor C:\progra~1\JGsoft\EditPadPro6\EditPadPro.exe /newinstance Usage: C:\WINDOWS\system32\fossil.exe setting ?PROPERTY? ?VALUE? PS C:\fossil\xyntservice> fossil settings editor '"c:\program files\jgsoft\editpadpro6\editpadpro.exe" /newinstance' Usage: C:\WINDOWS\system32\fossil.exe settings ?PROPERTY? ?VALUE? PS C:\fossil\xyntservice> fossil setting editor "C:\progra~1\JGsoft\EditPadPro6\EditPadPro.exe /newinstance" PS C:\fossil\xyntservice> fossil settings autosync (local) 1 diff-command dont-push editor (local) C:\progra~1\JGsoft\EditPadPro6\EditPadPro.exe /newinstance gdiff-command (local) C:\Program Files\Beyond Compare 3\BComp.exe http-port localauth (local) 0 clearsign (local) 0 pgp-command mtime-changes proxy web-browser PS C:\fossil\xyntservice>
rwilson added on 2009-09-22 18:55:18:
double quoting doesn't work either, but i'm not sure its the shell. technically you should be able to double-quote ("") or escape quotes with a carat (^"). windows powershell can escape with backquotes (`"). none of these methods appears to work with fossil.
PS C:\fossil\xyntservice> fossil settings editor """c:\program files\jgsoft\editpadpro6\editpadpro.exe"" /newinstance" Usage: C:\WINDOWS\system32\fossil.exe settings ?PROPERTY? ?VALUE?
drh added on 2009-10-31 15:09:12:
Check-in [b2fdf4fe143516126091186adb69c564ed7ced43]