Discussion:
--editor-cmd not working with paths with spaces?
Thorsten Schöning
2017-07-07 07:22:49 UTC
Permalink
Hi all,

I need to commit to some SVN repo in a Git bash/MinGW environment and
$ svn ci --editor-cmd "/usr/bin/vi"
Der Befehl "C:/Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
svn: E200012: system('C:/Program Files/Git/usr/bin/vi svn-commit.4.tmp') returned 1
svn: E200012: 'C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\0.11.0-SNAPSHOT\src\target\site-deploy\svn-commit.4.tmp'
$ svn ci --editor-cmd "C:\Program Files\Git\usr\bin\vi"
Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
svn: E200012: system('C:\Program Files\Git\usr\bin\vi svn-commit.5.tmp') returned 1
svn: E200012: 'C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\0.11.0-SNAPSHOT\src\target\site-deploy\svn-commit.5.tmp'
The command "C:/Program" is either wrong or couldn't be found."
Looking at the "system" line, it is clearly missing quotes. It looks
to me that this is a wrong invocation of the svn client itself, not
something from Git bash. Especially as it happens in default cmd.exe
of Windows as well.

Is this a bug?

From my point of view paths with spaces should be supported.

Mit freundlichen Grüßen,

Thorsten Schöning
--
Thorsten Schöning E-Mail: ***@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/

Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
Philip Martin
2017-07-07 09:17:09 UTC
Permalink
Post by Thorsten Schöning
From my point of view paths with spaces should be supported.
The user controls the spaces, on Linux at least:

$ svn ci --editor-cmd "/some/path/with\ spaces"

or

$ svn ci --editor-cmd "'/some/path/with spaces'"

Giving the user control over the meaning of spaces lets the user do
things like:

$ svn ci --editor-cmd "/some/path --some-arg"

and

$ svn ci --editor-cmd "VAR=value /some/path"

which would not be possible if all spaces were interpreted as part of
a path.
--
Philip
Bert Huijben
2017-07-07 09:46:48 UTC
Permalink
-----Original Message-----
Sent: vrijdag 7 juli 2017 09:23
Subject: --editor-cmd not working with paths with spaces?
Hi all,
I need to commit to some SVN repo in a Git bash/MinGW environment and
$ svn ci --editor-cmd "/usr/bin/vi"
Der Befehl "C:/Program" ist entweder falsch geschrieben oder konnte nicht
gefunden werden.
svn: E200012: system('C:/Program Files/Git/usr/bin/vi svn-commit.4.tmp')
Where is your vi.exe located?

If it is in C:\usr\bin\vi.exe I would recommend using --editor-cmd "C:\usr\bin\vi.exe" or if VI is in your path you could just use --editor-cmd vi.
(I often use --editor-cmd notepad2, which is just located somewhere in my PATH dirs.)

Bert

Loading...