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

Re: Directories and svn

From: Giles Williams <giles_at_aegidian.org>
Date: 2005-02-04 18:13:59 CET

On 4 Feb 2005, at 07:31, Jace Davies wrote:

> I am having trouble with Subversion (1.1.1, the newest FreeBSD port)
> working with directories.
>
> If a directory has its properties modified while checked out as a part
> of a working copy, I get this error message
>
> subversion/libsvn_wc/lock.c:646: (apr_err=155005)
> svn: Working copy '<directory.name>' not locked
>
> when attempting an svn update command.
>
> svn status gives the following output:
>
> ? <file.name>
> M <file.name.1>
> M <file.name.2>
> ~ <directory.name>
>
> The problem occurs with identical working copies on OS X and Linux
> platforms.
>
> I'd very much appreciate any assistance in finding out why this is the
> case.

I have a similar problem working with some file packages (aka bundles)
under OSX.

For example I have a file package ReadMe.rtfd under version control,
which is a folder consisting of an RTF text file (TXT.rtf), a graphic
(oolite-logo1.png), and a hidden file called .textattributes.dict

The directory looks like this:

unas:~/development/svn-working-copies/oolite giles$ ls -al ReadMe.rtfd
total 104
drwxr-xr-x 6 giles wheel 204 4 Feb 16:50 .
drwxr-xr-x 447 giles wheel 15198 4 Feb 16:50 ..
drwxr-xr-x 11 giles wheel 374 4 Feb 16:50 .svn
-rw-r--r-- 1 giles wheel 0 4 Feb 16:50 .typeAttributes.dict
-rw-r--r-- 1 giles wheel 16667 4 Feb 16:50 TXT.rtf
-rw-r--r-- 1 giles wheel 30551 4 Feb 16:50 oolite-logo1.png

Mac OS X treats the entire package/directory as a TextEdit file.
Unfortunately, when the file is edited and saved in TextEdit, the .svn
directory is clobbered and removed - causing the problems described in
your email. The same thing happens to .nib packages/directories edited
in Interface Builder. This appears to be a basic problem with using Mac
OS X with Subversion, since those Mac OS X applications that deal with
file packages in this way are not written to know that the .svn folder
should remain.

The only workaround is to copy the .svn folder to a temporary location,
then make your edits, then copy the .svn folder back into the file
package before using svn (to commit or whatever).

i.e.

unas:~/development/svn-working-copies/oolite giles$ cp -r
ReadMe.rtfd/.svn ~/ReadMe.rtfd.svn

>> Make the necessary changes to ReadMe.rtfd in TextEdit and save,
then...

unas:~/development/svn-working-copies/oolite giles$ cp -r
~/ReadMe.rtfd.svn ReadMe.rtfd/.svn
unas:~/development/svn-working-copies/oolite giles$ svn status
--show-updates
M 524 ReadMe.rtfd/TXT.rtf
Status against revision: 524
unas:~/development/svn-working-copies/oolite giles$ svn commit -m
"updated the ReadMe file"
Sending ReadMe.rtfd/TXT.rtf
Transmitting file data .
Committed revision 525.

I hope that this helps, I realise it's not an ideal solution - but I
can't see a way to fix this without major changes to the way either
Subversion or Mac OS X work.

-- Giles Williams
(first message to SVN user, I hope this is okay).
Received on Fri Feb 4 18:16:15 2005

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.