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

Question about splitting/merging repository

From: Jean-Yves Avenard <jyavenard_at_gmail.com>
Date: Thu, 23 Jun 2011 17:58:36 +1000

Hi there.

I would like to split our subversion repository as it has now attained
a size that makes it difficult to easily backup/maintain and there are
several area in that repo dedicated to projects no longer maintained

Before I proceed, I would like to ask to questions in order to confirm
that I got everything right.

I've read the handbook several times but there are technical aspects,
somehow I foresee a problem.

So my SVN repository is like:

/project1
/project2
/project3
/project4
/main/sub-project1
/main/sub-project2
/main/sub-project3
/main/sub-project4

What I would like is that working repo from now on to only contain:

/project1
/project4
/main/sub-project1
/main/sub-project4

While another will contain:
/project2
/project3
/main/sub-project2
/main/sub-project3

Should mention that I would like the revision number and history to
remain the same across both repo; so people can easily move their
existing checkout using svn switch.

so first, I have performed a full dump:
svnadmin dump /path/to/repo > repo.dump

Then I have run svndumpfilter like so:

svndumpfilter include project2 < repo.dump > projects.project2.dump
svndumpfilter include project3 < repo.dump > projects.project3.dump
svndumpfilter include main/sub-project2 < repo.dump >
projects.sub-project2.dump
svndumpfilter include main/sub-project3 < repo.dump >
projects.sub-project3.dump

Then, to create the new repo, I would do:

svnadmin create newrepo
svnadmin load --ignore-uuid newrepo < projects.project2.dump
svnadmin load --ignore-uuid newrepo < projects.project3.dump
svnadmin load --ignore-uuid newrepo < projects.sub-project2.dump
svnadmin load --ignore-uuid newrepo < projects.sub-project3.dump

Is that what I can expect?
Isn't there going to be some conflicts in regards to the empty
revision that are going to be added?
should I add : --drop-empty-revs in the 2nd and following svnadmin command?

I'm suspecting that what is an empty revision in the first load, will
be a loaded revision in the 2nd dump and is likely going to cause a
conflict..
I haven't tried yet because the dump is so big (150GB) and it's taking
several hours for each svndumpfilter to complete

Now, finally, what I would like to do is remove the exported directory
from the original repo ...
In my foggy understanding of the process, I can't figure how I can do
it other than working in succession from one dump to the next such as:
svndumpfilter exclude project2 < repo.dump > exclude.project2.dump
svndumpfilter exclude project3 < exclude.project2.dump > exclude.project3.dump
svndumpfilter exclude project3 < exclude.project3.dump > exclude.project4.dump
svndumpfilter exclude project3 < exclude.project4.dump > exclude.final.dump

Is that right?

Than obviously once it's all done:
svnadmin load newrepo < exclude.final.dump

Hopefully this is all I need to do, other than a massive amount of
free disk space and plenty of time.

Thank you in advance
Jean-Yves
Received on 2011-06-23 09:59:15 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.