REPOCUTTER(1) | Development Tools | REPOCUTTER(1) |
NAME¶
repocutter - surgical and filtering operations on Subversion dump filesSYNOPSIS¶
repocutter [-q] [-r selection] subcommand
DESCRIPTION¶
This program does surgical and filtering operations on Subversion dump files. While it is is not as flexible as reposurgeon(1), it can perform Subversion-specific transformations that reposurgeon cannot, and can be useful for processing Subversion repositories into a form suitable for conversion.In all commands, the -r (or --range) option limits the selection of revisions over which an operation will be performed. A selection consists of one or more comma-separated ranges. A range may consist of an integer revision number or the special name HEAD for the head revision. Or it may be a colon-separated pair of integers, or an integer followed by a colon followed by HEAD.
Normally, each subcommand produces a progress spinner on standard error; each turn means another revision has been filtered. The -q (or --quiet) option suppresses this.
Generally, if you need to use this program at all, you will find that you need to pipe your dump file through multiple instances of it doing one kind of operation each. This is not as expensive as it sounds; with the exception of the reduce subcommand, the working set of this program is bounded by the size of the largest commit metadata item. It does not need to hold the entire repo metadata in memory.
The following subcommands are available:
help
select
propset
propdel
proprename
log
setlog
squash
strip
expunge
pathrename
renumber
reduce
HISTORY¶
Under the name “snvcutter”, an ancestor of this program traveled in the contrib/ director of the Subversion distribution. It had functional overlap with reposurgeon(1) because it was directly ancestral to that code. It was moved to the reposurgeon(1) distribution in January 2016.SEE ALSO¶
reposurgeon(1).EXAMPLE¶
Suppose you have a Subversion repository with the following semi-pathological structure:Directory1/ (with unrelated content) Directory2/ (with unrelated content) TheDirIWantToMigrate/ branches/ crazy-feature/ UnrelatedApp1/ TheAppIWantToMigrate/ tags/ v1.001/ UnrelatedApp1/ UnrelatedApp2/ TheAppIWantToMigrate/ trunk/ UnrelatedApp1/ UnrelatedApp2/ TheAppIWantToMigrate/
You want to transform the dump file so that TheAppIWantToMigrate can be subject to a regular branchy lift. A way to dissect out the code of interest would be with the following series of filters applied:
repocutter expunge '^Directory1' '^Directory2' repocutter pathrename '^TheDirIWantToMigrate/' '' repocutter expunge '^branches/crazy-feature/UnrelatedApp1/ repocutter pathrename 'branches/crazy-feature/TheAppIWantToMigrate/' 'branches/crazy-feature/' repocutter expunge '^tags/v1.001/UnrelatedApp1/' repocutter expunge '^tags/v1.001/UnrelatedApp2/' repocutter pathrename '^tags/v1.001/TheAppIWantToMigrate/' 'tags/v1.001/' repocutter expunge '^trunk/UnrelatedApp1/' repocutter expunge '^trunk/UnrelatedApp2/' repocutter pathrename '^trunk/TheAppIWantToMigrate/' 'trunk/'
AUTHOR¶
Eric S. Raymond <esr@thyrsus.com>. This tool is distributed with reposurgeon; see the project page at http://www.catb.org/~esr/reposurgeon.04/30/2016 | repocutter |