svnadmin dumpwill be used along with
svndumpfiltermust be run using one of the following subcommands:
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
svndumpfiltercan 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
If filtering causes any revision to be empty (i.e., causes no change to the repository), removes these revisions from the final dump file.
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).