tags:

views:

16

answers:

1

Hi,

There was an accident and I lost my SVN repo directory, though my source folder and all the .svn folders within it are fine. How would I restore the repo using the source folder?

I ran $ svnadmin create /path/to/repo - now what?

Thanks

+2  A: 

How would I restore the repo using the source folder?

You can't. SVN keeps the history only in the repository, your working folder is just a snapshot. If you don't have any backups of your repository, the history is gone.

What you can do is to create a new repository and import your working folder there. (Be sure to not to attempt to import the .svn folders.)

sbi
Ah bummer. Any ideas on a linux command to recursively delete .svn folders inside the source folder? Cheers[EDIT] Google is my friend. $ rm -rf `find . -type d -name .svn`
Tom
@Tom: Of course you are recursively deleting __in a copy of your working copy__. Now that you have lost your repo, you wouldn't want to lose anything in your working copy, right?
sbi
@Tom: I think that, for all the distributed version control systems I have heard about (git, hq etc.) a working copy _is_ a repository, with all the history in it. If you're so bad at backups, you might want to consider using one of those.
sbi