[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svndumpfilter and subtrees

From: Jeremy Mordkoff <jlm_at_ZeeVee.Com>
Date: Fri, 20 Aug 2010 16:38:13 -0400

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_at_zeevee.com <mailto:jlm_at_zeevee.com>

www.zeevee.com <http://www.zeevee.com/>

 
Received on 2010-08-20 22:38:54 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.