[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: File not accepted as valid addition to svn

From: Dave Huang <khym_at_azeotrope.org>
Date: Tue, 13 Feb 2018 11:33:41 -0600

On 2/12/2018 11:41, Bo Berglund wrote:
> On Mon, 12 Feb 2018 15:54:00 +0000, Philip Martin
> <philip_at_codematters.co.uk> wrote:
>
>> '&' has special meaning to the shell and needs to be quoted or escaped.
> I always thought that this was the case only for Linux, since & is a
> perfectly valid part of a file name on Windows...
> But I will refrain from such characters in paths in the future.
>

& is valid for a filename on Linux too, but it also needs to be escaped
there... if you run "help cmd" in Windows, it says at the end:

The special characters that require quotes are:
      <space>
      &()[]{}^=;!'+,`~

The & in Windows is a command separator, basically like ";" in
Unix-style shells. So

svn add Fasadändring&Attefalltillbyggnad.pdf

Is interpreted as "svn add Fasadändring" followed by "Attefalltillbyggnad.pdf". The first results in "svn: warning: W155010: 'D:\Bosse\Fasadändring' not found", and the second results in "'Attefalltillbyggnad.pdf' is not recognized as an internal or external command, operable program or batch file."

Also, "^" is the escape character for cmd.exe (like "\" in Unix shells), so as an alternative to quoting the filename, you can do:

svn add Fasadändring^&Attefalltillbyggnad.pdf

-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym_at_azeotrope.org |  they raise a paw / the bat, the cat /
Telegram: @dahanc        |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 41 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
Received on 2018-02-13 18:40:34 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.