subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Huijben <b...@qqmail.nl>
Subject Re: SVN skipping revert after add for file path with spaces in it
Date Sat, 06 Sep 2014 05:03:12 GMT
I would start by removing the final ‘\' from the paths you create yourself, as they are never
necessary and affect the quoting rules (in some cases ignoring the final “). In general
you should never double the quoting characters.


Then you get to the boundary between parsing in 'svn’ and 'cmd', which both have their own
rules.


You should work from there as obviously your examples are not complete, or you would use a
literal ‘PATHWSPACES' as your subpart. (You miss the % surrounding).


If possible I would recommend using the quotes only at the outside of arguments. And make
sure you avoid ‘@' characters, or escape them by adding a final ‘@' add the end of the
path.


Bert 






Sent from Windows Mail





From: olli hauer
Sent: ‎Friday‎, ‎September‎ ‎5‎, ‎2014 ‎11‎:‎44‎ ‎PM
To: users@subversion.apache.org
Cc: Simone Agha





On 2014-09-05 22:37, Simone Agha wrote:
> Hi,
> 
> I'm having trouble un-adding a directory (recursively) that has spaces in its name. I
am doing this on Windows 8.1 through a  batch script. An example of my code is below:
> 
> set PATHWSPACES=%CD%
> svn add "PATHWSPACES"\subdir1\
> svn revert "PATHWSPACES"\subdir1\subdir2\ --recursive
> 
> When I run the batch script, the files are added correctly, but I get this line when
the directory is supposed to be reverted:
> 
> Skipped 'C:\Path with spaces\subdir1\subdir2'
> 
> Setting the PATHWSPACES variable using quotes of any kind does not work. However, what
does work is typing out the complete path which is not feasible for what I'm trying to do
with the batch script. So, this works:
> 
>                 Set PATHWSPACES=%CD%
>                 svn add "PATHWSPACES"\subdir1\
>                 svn revert "C:\Path with spaces\subdir1\subdir2\" --recursive
> 
> Putting quotes around the entire path or putting quotes around the variable and the entire
path also does not work. I get the following messages:
>                 For code that is: svn revert "PATHWSPACES\subdir1\subdir2" --recursive
>                svn: E155007: 'C:Path' is not a working copy
>                 For code that is: svn revert ""PATHWSPACES"\subdir1\subdir2\" --recursive
>                 Skipped 'C:\Path with spaces\subdir1\subdir2" -recursive'
> 
> Help! What is going on? Unfortunately, I can't change to a path name without spaces.
> 

I can think about two solutions

1) instead using "PATHWSPACES"\subdir1\ use "PATHWSPACES\subdir1\"
2) cd "PATHWSPACES\subdir1\" && svn revert -R

Even windows self has today issues with masking spaces in the path, you will find x samples
with quoted paths in the registry or on technet.
Not exactly your issue but describes how to use cmd and quotes http://technet.microsoft.com/en-us/library/cc771320.aspx
Mime
View raw message