svnadmin dump
will be used along with svndumpfilter
command.
svndumpfilter
must be run using one of the following subcommands: include
or exclude
. Depending on what is easier, you may specify which path prefixes (or directories) will be included into new subrepo dump - or which will be excluded.
For example, let's assume our original repository structure looks like the following:
/abc some content /def some content /ghi some content /jkl some contentIf we run:
$ svndumpfilter include /abc /def # pseudo commandour subrepo will consist of:
/abc some content /def some contentbut if we run:
$ svndumpfilter exclude /abc # pseudo commandour subrepo will consist of:
/def some content /ghi some content /jkl some contentI wrote pseudo command, since you have to stream the original repository first, so that
svndumpfilter
can filter its content. Real commands would look like:
$ svnadmin dump /home/tomasz/svn/original_repo | svndumpfilter include /abc /def --drop-empty-revs --renumber-revs > subrepo.svndump $ svnadmin dump /home/tomasz/svn/original_repo | svndumpfilter exclude /abc --drop-empty-revs --renumber-revs > subrepo.svndump
Now let's take a look at some svndumpfilter
options:
--drop-empty-revs
If filtering causes any revision to be empty (i.e., causes no change to the repository), removes these revisions from the final dump file.
--renumber-revs
Renumbers revisions that remain after filtering.
Thanks to above options, the result repository dump will look as if it always consisted of the chosen parts (no empty commits).
No comments:
Post a Comment