You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexis Huxley <ah...@gmx.net> on 2002/05/04 14:47:09 UTC
How precious is .svn?
Hi
I have a dir structure like:
project
\__ subdirA
\__ .svn
\__ somefile.html
\__ someotherfile.html
\__ images
\__ map.jpg
\__ pic1.jpg
\__ pic2.jpg
\__ subdirB
\__ .svn
\__ images
\__ map.jpg
In order to populate subdirB, which up till an hour ago was an almost
empty directory, I did a 'cp -r' of subdirA into subdirB, and the
removed subdirB/images/pic*, and I created a 'somefile.html'.
Now 'svn st' reports '!_' for the cloned but deleted images which
are referenced by the cloned but unaltered .svn directory. It's probably
also a bit confused about about the new files, which it reports as
modified.
I guess, one possible recovery is to copy the new/modified stuff out
of the WC, do an update and then move that new/modified stuff back
in and then commit.
But then I started to wonder: just how precious is .svn? (1) Do I need
to guard against this sort of slip, (2) is there a way to say to svn:
"I cocked up and corrupted .svn, so please refer to the repository
when making comparisons, instead of the .svn directories!", (3)
is there an 'official' svn-ish recovery procedure for such a slip?
Thanks!
Alexis (At repository revision 5 :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: How precious is .svn?
Posted by Ben Collins-Sussman <su...@collab.net>.
Alexis Huxley <ah...@gmx.net> writes:
> Hi
>
> I have a dir structure like:
>
> project
> \__ subdirA
> \__ .svn
> \__ somefile.html
> \__ someotherfile.html
> \__ images
> \__ map.jpg
> \__ pic1.jpg
> \__ pic2.jpg
> \__ subdirB
> \__ .svn
> \__ images
> \__ map.jpg
>
> In order to populate subdirB, which up till an hour ago was an almost
> empty directory, I did a 'cp -r' of subdirA into subdirB, and the
> removed subdirB/images/pic*, and I created a 'somefile.html'.
>
> Now 'svn st' reports '!_' for the cloned but deleted images which
> are referenced by the cloned but unaltered .svn directory. It's probably
> also a bit confused about about the new files, which it reports as
> modified.
The problem is that you can't just 'cp -r' a version-controlled
directory within a working copy. You should have used 'svn cp'
instead.
> I guess, one possible recovery is to copy the new/modified stuff out
> of the WC, do an update and then move that new/modified stuff back
> in and then commit.
Sure.
> But then I started to wonder: just how precious is .svn? (1) Do I need
> to guard against this sort of slip,
Use 'svn cp'
> (2) is there a way to say to svn: "I cocked up and corrupted .svn,
> so please refer to the repository when making comparisons, instead
> of the .svn directories!",
Well, if you corrupt part of your working copy, or make .svn unusable,
the only real thing you can do is destroy the area and re-update. The
area should be re-created.
> (3) is there an 'official' svn-ish recovery procedure for such a
> slip?
'svn cleanup' will finish running log-actions in your wc if a crash
happens, but that's a solution to a different kind of problem.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org