views:

518

answers:

3

We have a subversion repository with one directory that is:

  • not really in need of revision control beyond the capabilities of RCS
  • not versioned in conjunction with anything else in the repository
  • modified about 6x as often as the rest of the repository

Although I know that high rev numbers aren't a problem, nonetheless I'd like to pull this one single directory out of my main repository and into a second, ideally new one.

What is the best process for that? If it makes a difference, the svn repository is hosted on a (... checks... ) FreeBSD machine.

(edit) It's worth noting that while I need to retain the version history in the new repository, there's no need to obliterate the content in the old; it can just sit there, for all I care.

A: 

I would export (not checkout) the directory, import it into the new repository, then delete it from the original (with a log message indicating where it went, of course ;-).

That may or may not be the "best" way to do it...

David Zaslavsky
No history, for example. Sorry, that'd be a nonstarter.
Chris R
I didn't realize at the time that you wanted to preserve the history :-/
David Zaslavsky
No worries, it wasn't obvious. I've amended the question.
Chris R
+4  A: 

You could use svnadmin dump and svnadmin load to create a new repository from the original one; then copy the directory that doesn't really fit into your scheme to a better location, then delete everything else. In the original repository you would simply delete the non-fitting directory. This keeps all history intact, and you end up with two repositories.

There is probably a way to subsequently clean both repositories from the then useless parts of the history (svndumpfilter), but since hard disc space is quite cheap I wouldn't think this necessary. Anyway, the SVN documentation has all the information about it.

mghie
A: 

I don't know if I understand this correctly, but there's a nice solution to that. If your original repository was at svn://domain, and the folder you use a lot is called "folder", I believe you can simply perform the following command: svn co svn://domain/folder to checkout only that folder.

Andrew Szeto