Subversion hackery

In preparation from some git experimentation, I just converted one subversion repository with a layout like this:

repo/
repo/example_dragdrop
repo/dedup

Into two separate repositories, each named after their respective project, containing a trunk/ folder with all the content. Here is what I did:

svnadmin dump repo > repo.dump

I had previously done a lot of moving crap around inside this repo that svndumpfilter objected to vehemently, so I edited repo.dump, found those revisions (look for lines starting ^Revision-number:) and deleted them.

Then I could use svndumpfilter to pull the separate projects out of the dump:

cat repo.dump | svndumpfilter --drop-empty-revs --renumber-revs include example_dragdrop > example_dragdrop.dump
 
cat repo.dump | svndumpfilter --drop-empty-revs --renumber-revs include dedup > dedup.dump

I then editted these new dump files to change the name of the top folder from dedup/ and example_dragdrop/ respectively, to trunk/.   To do this was mostly a global exchange of /^Node-path: example_dragdrop/  to /Node-path: trunk/.    Dedup required an additional step as there were additional renames within the repo.  This required the updating of lines starting /^Node-copyfrom-path:/.

Once this was done, new repos could be created:

svnadmin create example_dragdrop ; svnadmin load example_dragdrop < example_dragdrop.dump
 
svnadmin create dedup ; svnadmin load dedup < dedup.dump

And that was pretty much it.

You must be logged in to post a comment.