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

MacOSX, and handling the loss of .svn/ from managed subdirectories

From: Patrick Middleton <patrick_at_onestep.co.uk>
Date: 2007-04-13 17:58:50 CEST


I'm working with svn 1.4.3 on MacOSX 10.4. I have an old problem and
a new one.

The old problem is that I'm working on MacOSX, and many things which
look like files are actually directories which contain a standard
layout of files within them. A fine example is Main.wo ; this is a
WebObjects component, and is actually
drwxr-xr-x Main.wo/
-rw-r--r-- Main.wo/Main.html
-rw-r--r-- Main.wo/Main.wod
-rw-r--r-- Main.wo/Main.woo

If this component is part of a project versioned in Subversion, there
will also be a directory Main.wo/.svn/ too of course, the 'Working
Copy Administration Area'. There are are editor applications such as
WebObjects Builder.app for modifying these document packages supplied
with Apple Developer Tools; in the case of WebObjects, the three
files inside the document wrapper are text, so you don't have to use
the GUI editor application, but it's usually convenient too.
Inevitably, when saving a modified document, the editor application
doesn't preserve the .svn directory. That's the old problem; when
users of CVS instead of Subversion, I'm told it's far worse.

The new problem is what happens next. It is usual for either or both
of Main.wo/Main.html and Main.wo/Main.wod to have changed at this
point. I do 'svn status' and Main.wo shows up with a status of '~',
which doesn't get much discussion in any of the documentation I
remember reading, and the Main.html and Main.wod files do not show up
at all. In http://svnbook.red-bean.com/nightly/en/svn-book.pdf [I'm
looking at "For Subversion 1.4, (Compiled from r2747)"] this status
code isn't mentioned in the "See an overview of your changes"
section. Later on there's some Python code which suggests that '~'
means "obstructed", and Googling for 'svn obstructed' offers an

Then, I do 'svn status' again and Main.wo and doesn't show up
either! I haven't been through the svn source code to discover what
it's doing, but it appears that svn realises during the first 'svn
status' that the Working Copy Administration Area is missing and
builds a new one; but the Working Copy Administration Area contains
"Pristine (un-edited) copies of the working copy files". The new
pristine files aren't copies of what's in the repository; they're
copies of my working copies, which I've edited.

Now, being a naive user who hasn't memorised the documentation, I
think that 'svn status' is showing me the changes of my working copy
against the repository. It's not, it's showing me the differences
between my working copy and the pristine copy held by the Working
Copy Administration Areas. And svn certainly hasn't told me that one
of the Working Copy Administration Areas has been recreated. So I
know I've got changes to commit, but 'svn status' says not.

I then realise what's happened and try 'svn update' on the versioned
directory and files I know I've changed; neither the files nor the
pristine copies change.

I realise that this my fault for allowing Main.wo/.svn/ to get
trashed, but why is svn working against me like this?

The only way I've found to fix this so far is to check out a second
copy of the project, and copy .../second/project/Main.wo/.svn to .../
first/project/Main.wo/.svn . I'm sure there must be a better way of
doing this.

Patrick Middleton
OneStep Solutions plc
351 London Road             Phone: +44 (0)1702 426400
Hadleigh                    Fax:   +44 (0)1702 556855
Essex. SS7 2BT              Email: patrick@OneStep.co.uk
England                            (MIME welcome)
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 13 17:59:30 2007

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