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


From: Ingo Schmidt <ich_at_der-ingo.de>
Date: 2007-03-23 18:23:34 CET

Hi everyone!

I have asked this before but got no reply, so lets bring this up

Let's assume I have an svn dumpfile that would create the following
repository if I "svnadmin load" it:

  Project A
    Sub A1
    Sub A2
  Project AB
    Sub AB1
    Sub AB2
  Project ABC
    Sub ABC1
    Sub ABC2

Now I want to split this into 3 single repositories called "Project
A","Project AB" and "Project ABC" respectively.
The layout of the to-be-created repositories shall be like that (X = {A, AB, ABC}):

Project X:
  Sub X1
  Sub X2

So let's say I want to split off Project A. I tried:

1. cat dumpfile | svndumpfilter include "trunk/Project A" > "Project A"
2. cat dumpfile | svndumpfilter include "trunk/Project A/" > "Project A"

This fails. All projects get included, since all project names start
with "Project A". I do understnad this in the first case, but not in
the second.

So the only approach left seems to be to exclude everything except
what I want:

cat dumpfile | svndumpfilter exclude "trunk/Project AB" "trunk/Project ABC" > "Project A"

In my example case this is no problem, but given a really big
repository one will have to write really long exclude filters. Is that
really the only way?

Ok, now that I have written up all my exclude filters comes the
second problem:

I do want to get rid of the folders called "Project X". In my split up
repositories there will be one folder level less!

So I could run svndumpfilter again, this time on one of the split
dumpfiles and including "trunk/Project X". That will exclude the node
where "trunk" is being created. Then, in the dumpfile, I rename
"trunk/Project X" to "trunk" (e.g. via sed) and I am done.

That is a lot of svndumpfilter and also sed and it takes bloody ages
to do it like that. I have come across this while porting a rather big
VSS database to Subversion. In the end I succeeded, everything got
ported and split up well. But it took many many hours, because working
like this with svndumpfilter and sed on dumpfiles of the size > 2GB is
not that cool, IMHO.

Or did I simply not see easier ways of splitting this?

Cheers, Ingo =;->

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Mar 23 18:24:02 2007

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.