You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by ri...@mail.com on 2011/04/10 05:40:32 UTC

How does SVN keep track of what repo it has checked out?

Hi, everyone.

I realize that my working copy has a .svn directory with information in 
it that SVN uses.  In the book, it says on page 19 (page 41 of the pdf):

"If you accidentally remove the .svn subdirectory, the easiest way to 
fix the problem is to remove the entire containing dir- ectory (a 
normal system deletion, not svn delete), then run svn update from a 
parent directory. The Subversion client will download the directory 
you've deleted, with a new .svn area as well."

Now, if you've removed the .svn directory, how does svn 'know' which 
repo you're using?  Does SVN store information somewhere else?

I had a repo checked out and I wanted to un-checkout it - that is to 
say, stop using that repo.  I was told that the simplest way would be 
to just delete the .svn directory.  Is it acceptable to do this?  Or 
have I left debris on my system by doing so?

Richard



Re: How does SVN keep track of what repo it has checked out?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 9, 2011, at 22:40, richardcavell@mail.com wrote:

> I realize that my working copy has a .svn directory with information in it that SVN uses.  In the book, it says on page 19 (page 41 of the pdf):
> 
> "If you accidentally remove the .svn subdirectory, the easiest way to fix the problem is to remove the entire containing dir- ectory (a normal system deletion, not svn delete), then run svn update from a parent directory. The Subversion client will download the directory you've deleted, with a new .svn area as well."
> 
> Now, if you've removed the .svn directory, how does svn 'know' which repo you're using?

It will consult the .svn directory in the parent directory, which, for the above advice to work, would have to be part of the same working copy.

> Does SVN store information somewhere else?

Nope, each working copy is self-contained.

> I had a repo checked out and I wanted to un-checkout it - that is to say, stop using that repo.  I was told that the simplest way would be to just delete the .svn directory.  Is it acceptable to do this?

Sure, if you want to keep using the directory but have it no longer connected with the repository, then delete the .svn directories, or run "svn export" to a new directory and then delete the working copy, which has the same effect. Or if you're done with the directory completely, just delete the working copy.

> Or have I left debris on my system by doing so?

Nope.

The working copy format will completely change in Subversion 1.7 so the above may no longer apply then.