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

Re: How precious is .svn?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-05-04 16:57:20 CEST

Alexis Huxley <ahuxley@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
Received on Sat May 4 17:00:17 2002

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