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

Re: issue: space in file name prevents svn info from showing locked status

From: Ben Reser <ben_at_reser.org>
Date: 2006-05-23 07:10:32 CEST

On 5/18/06, B. Smith-Mannschott <benpsm@gmail.com> wrote:
> Issue
> ======
>
> Locked files with spaces in their names are not reported as locked in
> the repository by ``svn info`` (but are reported as locked by ``svn
> status``).
>
>
> Version
> =======
>
> - svn, version 1.3.1 (r19032) (compiled May 2 2006, 19:39:28)
>
> - ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
> - ra_svn : Module for accessing a repository using the svn network protocol.
> - ra_local : Module for accessing a repository on local disk.
>
> - Linux zocalo 2.6.10-6-686 #1 Fri Mar 10 17:58:34 UTC 2006
> i686 GNU/Linux (Ubuntu 2005-04?)
>
> Demonstration
> =============
>
> I'll create a simple repository in ``/tmp/repos``, and check out a
> working copy into ``/tmp/workingcopy``::
>
> zocalo:~$ cd /tmp
> zocalo:/tmp$ svnadmin create /tmp/repos
> zocalo:/tmp$ svn co file:///tmp/repos /tmp/workingcopy
> Checked out revision 0.
> zocalo:/tmp$ cd /tmp/workingcopy
>
> Create two files, one with spaces in its name, and one without. Then
> lock them both::
>
> zocalo:/tmp/workingcopy$ touch 'file name with space'
> zocalo:/tmp/workingcopy$ touch 'file-without-space'
> zocalo:/tmp/workingcopy$ svn add file*
> A file name with space
> A file-without-space
> zocalo:/tmp/workingcopy$ svn -m '' commit .
> Adding file name with space
> Adding file-without-space
> Transmitting file data ..
> Committed revision 1.
>
> zocalo:/tmp/workingcopy$ svn lock 'file name with space'
> 'file name with space' locked by user 'smithma'.
> zocalo:/tmp/workingcopy$ svn lock file-without-space
> 'file-without-space' locked by user 'smithma'.
>
> Now, I'll use ``svn info`` on my working copy to see if the two files
> I've just locked are indeed locked. Nothing unexpected here. (I've
> removed irrelevant lines of output to save space.)::
>
> zocalo:/tmp/workingcopy$ svn info *
>
> Path: file name with space
> URL: file:///tmp/repos/file%20name%20with%20space
> Lock Token: opaquelocktoken:3eb6e352-1114-0410-9989-ccab4852dc2b
> Lock Owner: smithma
> Lock Created: 2006-05-18 17:02:24 +0200 (Thu, 18 May 2006)
>
> Path: file-without-space
> URL: file:///tmp/repos/file-without-space
> Lock Token: opaquelocktoken:c62f4d53-1114-0410-8b17-9406e715bb90
> Lock Owner: smithma
> Lock Created: 2006-05-18 17:02:31 +0200 (Thu, 18 May 2006)
>
> Now, I'll ask the repository to tell me what it knows about these two
> files. It should tell me that they are both locked, but it does not::
>
> zocalo:/tmp/workingcopy$ svn -R info file:///tmp/repos
>
> Path: repos
> URL: file:///tmp/repos
>
> Path: file name with space
> Name: file name with space
> URL: file:///tmp/repos/file%20name%20with%20space
>
> Path: file-without-space
> Name: file-without-space
> URL: file:///tmp/repos/file-without-space
> Lock Token: opaquelocktoken:c62f4d53-1114-0410-8b17-9406e715bb90
> Lock Owner: smithma
> Lock Created: 2006-05-18 17:02:31 +0200 (Thu, 18 May 2006)
>
> Just, for kicks, we'll see what ``svn status`` says. On the working
> copy that holds the locks, it has no trouble determining that the
> files are locked::
>
> zocalo:/tmp/workingcopy$ svn status -u *
> K 1 file name with space
> Status against revision: 1
> K 1 file-without-space
> Status against revision: 1
>
> Even a fresh working copy, gives it no trouble::
>
> zocalo:/tmp/workingcopy$ cd ..
> zocalo:/tmp$ svn co file:///tmp/repos /tmp/workingcopy2
> A /tmp/workingcopy2/file name with space
> A /tmp/workingcopy2/file-without-space
> Checked out revision 1.
>
> zocalo:/tmp$ svn status -u workingcopy2/*
> O 1 workingcopy2/file name with space
> Status against revision: 1
> O 1 workingcopy2/file-without-space
> Status against revision: 1
>
> Conclusion
> ==========
>
> I haven't found it in the Issues database. This looks like a bug to
> me. Thoughts?
>
>
> Background
> ==========
>
> Unfortunately, ``svn status`` only works on working copies an not on
> URLs, or I would try to use it as a work-around.
>
> This problem surfaced because I have written a small CGI script which
> pushes the output of ``svn info --xml`` through a transformation to
> generate an overview of currently locked files. This, in turn works
> around a defect in *subclipse*, whereby it will tell you when you
> can't lock a file because someone else has the lock, but won't tell
> you *who* has the lock.
>
> Thankfully, none of our development artifacts are stored in files
> containing spaces. (Maybe I was prescient when I pushed for that
> restriction in our development standards.)

Replicated on trunk and issue located. Patch should be forthcoming in
a short while.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 23 07:10:59 2006

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

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