How to Load partial repository dump without changing revision numbers

563 views Asked by At

We have a corporate SVN repository with many projects being hosted, each with its own branches/trunk/tags. My team is only interested in 2 projects.

So I created 2 dump files using svnrdump. Now I'm trying to load them into my local SVN. But I would like to preserve the revision numbers. When I load the first project, revision numbers are correct. But when I load the second project, revision number resumes where the first project ended. This is true when I tried with svnrdump and also with svnadmin.

Is there a way to create a single dump file for 2 selected projects ?

1

There are 1 answers

10
bahrep On

Use svnadmin dump with the --include or --pattern arguments to generate one repository dump stream preserving revision numbers.

For instance, the command should look as follows:

svnadmin dump MYREPO --include /project1 --include /project2 --file myrepodumpfile.svndump

Here is a part of svnadmin help dump help:

  --exclude ARG            : filter out nodes with given prefix(es) from dump
  --include ARG            : filter out nodes without given prefix(es) from dump
  --pattern                : treat the path prefixes as file glob patterns.
                             Glob special characters are '*' '?' '[]' and '\'.
                             Character '/' is not treated specially, so
                             pattern /*/foo matches paths /a/foo and /a/b/foo.
                                 pattern /*/foo matches paths /a/foo and /a/b/foo.

BTW, you can improve performance of svnadmin dump by adding the -M 256 argument.:

  -M [--memory-cache-size] ARG : size of the extra in-memory cache in MB used to
                             minimize redundant operations. Default: 16.
                             [used for FSFS repositories only]