tags:

views:

92

answers:

3

Hi,

How do I split a repository by revision so that I can archive its history while still able to continue commit to the head repository.

For example, lets say I have 1000 revision in my repository.

I would like to split this repository into 2: The first consist of 1 to 500 revision while the second consist of 501 to 1000.

The first one is going to be archived. The second one will continue act as the active repositories where commits are still done on it.

They are suppose to be able to merge as one when needed.

Anyway idea how this can be accomplish?

+1  A: 

May I ask why you are looking for this? There are some public repos with many thousands of commits, and having the entire repo available is very handy. File size shouldn't grow too fast unless you are storing giant movies in it or something...

I don't think SVN is really made to work like this, without the full history, you couldn't trace a file back. You can take the head of the old repo and start a new repo with it... but any tracing between the old and new repo would have to be done manually.

bwawok
A: 

I don't know why you would want that, but you can do it. Subversion lets you dump your repository into a text file, in order to migrate the data to an other SVN Server:

Use the svnadmin dump command to generate the dump data, and svnadmin load to populate a new repository with it.

You can also filter the repository history if you want to exclude stuff. I'm not sure how complex it would be to get what you are going for, but those links should be the place to start. I did it once, but for something similar to the example in the link.

With Subversion, when in doubt, go to the source.

Fernando
+1  A: 

the svnadmin dump commando can accomplish this task of "flatten" the repository history:

svnadmin dump -r1:500 /path/to/repo > archive.dmp

svnadmin dump -r500:HEAD /path/to/repo > new_repo.dmp

svnadmin create /path/to/new/repo

svnadmin load /path/to/new/repo < new_repo.dmp
Peter Parker