You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jeremy Mordkoff <jl...@ZeeVee.Com> on 2010/08/20 20:38:13 UTC
svndumpfilter and subtrees
I have a repository with multiple projects that used to be branched in
parallel, but now need to be split. How do I accomplish this?
Current tree
zcode/
zcode/trunk/comp1
zcode/trunk/comp2
zcode/branches
zcode/branches/rel_1/comp1
zcode/branches/rel_1/comp2
zcode/branches/rel_2/comp1
zcode/branches/rel_2/comp2
except there are actually 11 components, with 8 staying and 3 migrating
to a new repository, and there are actually about 25 branches. There are
14,000 commits in our repository.
One option (I think) would be to move comp2 to the top using a perl
script against the svn dumpfile so that the tree became
zcode/
zcode/trunk/comp1
zcode/branches
zcode/branches/rel_1/comp1
zcode/branches/rel_2/comp1
ccode/
ccode/trunk
ccode/trunk/comp2
ccode/branches
ccode/branches/rel_1/comp2
ccode/branches/rel_2/comp2
And then filter on zcode vs ccode:
svnadmin create repos/ccode
svnadmin dump repos/zcode | perl -p -e 's-Nodepath:
zcode/(trunk|(branches|tags)/[^/]+)/comp2-Nodepath: ccode/$1/comp2-;' |
svndumpfilter include ccode | svnadmin load repos/ccode
svnadmin create repos/zcode2
svnadmin dump repos/zcode | perl -p -e 's-Nodepath:
zcode/(trunk|(branches|tags)/[^/]+)/comp2-Nodepath: ccode/$1/comp2-;' |
svndumpfilter exclude ccode | svnadmin load repos/zcode2
My concern here is how do directories like /ccode/trunk and
/ccode/branches get created? Can a pre-create them in the new
repository? I don't care that much about preserving revision numbers in
the ccode repo.
I cannot simply clone the repos and then selectively delete as the new
owners of the new repo could potentially recreate the code from the old
repo.
Are there any other options?
JLM
Jeremy Mordkoff
Director, QA, IT & Release
ZeeVee, Inc.
One Monarch Drive | Littleton, MA 01460
Office: 978.467.1395 x233 | Fax: 978.467.1404
Mobile: 978-257-2183
jlm@zeevee.com <ma...@zeevee.com>
www.zeevee.com <http://www.zeevee.com/>