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

Re: working copy corruption when network connection lost

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-01-05 00:18:29 CET

Ben Collins-Sussman <sussman@collab.net> writes:

> Yes, I see the intent to do this in the wc update editor
> (libsvn_wc/get_editor.c). Look at add_directory() -- you'll see that
> after creating a new directory, it adds a pointer in the parent's
> entries file. This is wrong, I think. If you scoot down to the
> close_directory() routine, you'll notice that there's an ancient
> comment about placing the parental link there.
>
> This fix shouldn't be too hard; close_directory() just needs to
> figure out if the directory was either added or opened. If added,
> make a link in the parent. And of course, don't forget to remove the
> parental linkage in add_directory().

Yes, this seems to work, although decrement_ref_count turned out to be
where I made the link to the parent.

It's a little untidy for the user after an update has failed. While
'svn st' is OK I would probably use 'svn st -uv' before deleting stuff
and thus I get things like

$ svn st -uv wc
_ * 1 wc
_ * 1 wc/bar
_ * 1 wc/foo
? * wc/zac
       * wc/zac/bar
_ * 2 wc/zac/foo
Head revision: 2

In this case I interrupted the creation of wc/zac/bar, and while
wc/zac is correctly shown as being unversioned the contents of wc/zac
are also show, some of which appear to be versioned since they have
entries in wc/zac/.svn/entries. I think it would be better to see

$ svn st -uv wc
_ * 1 wc
_ * 1 wc/bar
_ * 1 wc/foo
? * wc/zac
Head revision: 2

This could be fixed by making svn_client_status not descend into
unversioned directories.

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:54 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.