Reputation: 37516
I have a subversion repository which currently has code, documentation and deliverables. This is becoming messy and unmanageable so I'd like to split the repositories into three.
How can I move subsections of the original repository (which will contain purely code) into new Documentation
and Deliverables
repositories without losing the history? For example:
<old_repos>\Docs
<old_repos>\Deliverables
<old_repos>\Src
...becomes:
<docs_repos>
<deliverables_repos>
<src_repos>
I've seen a lot of posts about moving folders around within a repository and others showing how to move one whole repository to another, but nothing that suggests how to just move a subset. Is this possible?
Upvotes: 1
Views: 337
Reputation: 97395
Not tried and not tested personally
You'll use svnadmin dump, svnadmin load and svndumpfilter (commands are slightly Unixish-style)
1 Create full dump of original repo: svnadmin dump . > full.dump
2-4 Filter dump and leave only revisions, related to needed subdir respectivey: cat full.dump | svndumpfilter include DIR-PATH --drop-empty-revs --renumber-revs --skip-missing-merge-sources --preserve-revprops > DIR-PATH.dump
5-7 For every new empty repo: svnadmin load . --parent-dir trunk --ignore-uuid < DIR-PATH.dmp
In worst case new repos will get not /trunk/*.* data-trees
, but /trunk/DIR-PATH/*.*
, which are easy eliminated by one big move and delete empty DIR-PATH after all
PS - I just discovered after writing my text: How to move a single folder from one Subversion repository to another repository?
Upvotes: 1
Reputation: 34418
You can use svndumpfilter. There's instructions in the docs there, although
--deltas
dump - it doesn't support that. I think --incremental
was OK thoughIt takes a bit of effort but I've done this successfully a few times.
Upvotes: 1