3

There are a lot of posts on moving a Subversion history with version history but i am looking to do something different.

Basically we have a repository that has been used as a proof of concept and we want to archive this. However we want to create a new repository with the latest version of some the code but with author histroy saved but it's a fresh start so we aren't interested in keeping the version history. Plus we are trying to keep the repository size down as there were binaries saved in the past that is causing the repository to be far too large.

I will also at the same time want to remove some of the folders which I think I can use the dump filter on?

As I want to keep user information checking out and checking back into the new place wouldn't be the preferred option.

bahrep
  • 29,961
  • 12
  • 103
  • 150
Firedragon
  • 3,685
  • 3
  • 35
  • 75
  • 3
    You're contradicting yourself. You want author history, but you don't want history? Clarify. – Christoffer Hammarström Dec 08 '11 at 15:25
  • I suppose he wants only the head revision of each file – Filip De Vos Dec 08 '11 at 15:27
  • @ChristofferHammarström I have clarified. Basically I want the most recent author but no versioning history. guess it's a little odd but I don't want every file to say that I last checked them in. Maybe I am looking for the wron solution to the issue of having the binary files stored in there. – Firedragon Dec 08 '11 at 15:29

2 Answers2

3

To have the latest version of the files with their author, commit date and commit message, you will have to use svnadmin dump to create a dump file from your repository and svndumpfilter to filter out the revisions you don't want to keep.

Working with svndumpfilter is in general a very frustrating exercise and you might need to rely on derived (and often ill-maintained) programs such as svnfiltereddump, svndumpsanitizer, svndumpfilter2 or svndumpfilter3.

In the end you should ask yourself the question if the cleanup in the history is really worth the effort.

Filip De Vos
  • 11,568
  • 1
  • 48
  • 60
  • Unfortunately the repository is over 600MB which I know isn't that large in the scheme of things but but is only for a few applications for which they are mostly source code so it should be much smaller. However it's because binaries were commited back in the past which are inflating the repository size and there seems no easy way to remove these without the toosl you mention – Firedragon Dec 08 '11 at 15:48
  • You could create a dump and remove the base64 strings of the binaries from the dump file. (it's a plain text file.) – Filip De Vos Dec 08 '11 at 15:51
3

You can simply do an svn export of the projects you want to continue to have and do on the new repository a svn import. Before the import just remove the files you don't want to import.

bahrep
  • 29,961
  • 12
  • 103
  • 150
khmarbaise
  • 92,914
  • 28
  • 189
  • 235