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

RE: SVN skipping revert after add for file path with spaces in it

From: Simone Agha <simone.agha_at_witricity.com>
Date: Mon, 15 Sep 2014 15:00:34 +0000

Thanks, your advice helped. What ended up working was:

svn add "PATHWSPACES"\subdir1\
cd "PATHWSPACES"\subdir1\subdir2 && svn revert -R .

Thanks,
Simone

-----Original Message-----
From: olli hauer [mailto:ohauer_at_gmx.de]
Sent: Friday, September 5, 2014 5:45 PM
To: users_at_subversion.apache.org
Cc: Simone Agha
Subject: Re: SVN skipping revert after add for file path with spaces in it

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
Received on 2014-09-15 17:01:36 CEST

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.