'\" t
.\" Title: repocutter
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 04/30/2016
.\" Manual: Development Tools
.\" Source: repocutter
.\" Language: English
.\"
.TH "REPOCUTTER" "1" "04/30/2016" "repocutter" "Development Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
repocutter \- surgical and filtering operations on Subversion dump files
.SH "SYNOPSIS"
.HP \w'\fBrepocutter\fR\ 'u
\fBrepocutter\fR [\-q] [\-r\ \fIselection\fR] \fIsubcommand\fR
.SH "DESCRIPTION"
.PP
This program does surgical and filtering operations on Subversion dump files\&. While it is is not as flexible as
\fBreposurgeon\fR(1), it can perform Subversion\-specific transformations that reposurgeon cannot, and can be useful for processing Subversion repositories into a form suitable for conversion\&.
.PP
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\&.
.PP
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\&.
.PP
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\&.
.PP
The following subcommands are available:
.PP
help
.RS 4
Without arguments, list available commands\&. With a command\-name argument, show detailed help for that subcommand\&.
.RE
.PP
select
.RS 4
The \*(Aqselect\*(Aq subcommand selects a range and permits only revisions in that range to pass to standard output\&. A range beginning with 0 includes the dumpfile header\&.
.RE
.PP
propset
.RS 4
Set a property to a value\&. May be restricted by a revision selection\&. You may specify multiple property settings\&. See the embedded help for syntax details\&.
.RE
.PP
propdel
.RS 4
Delete the named property\&. May be restricted by a revision selection\&. You may specify multiple properties to be deleted\&. See the embedded help for syntax details\&.
.RE
.PP
proprename
.RS 4
Rename a property\&. May be restricted by a revision selection\&. You may specify multiple properties to be renamed\&. See the embedded help for syntax details\&.
.RE
.PP
log
.RS 4
enerate a log report, same format as the output of svn log on a repository, to standard output\&.
.RE
.PP
setlog
.RS 4
Replace the log entries in the input dumpfile with the corresponding entries in a specified file, which should be in the format of an svn log output\&. Replacements may be restricted to a specified range\&. See the embedded help for syntax details\&.
.RE
.PP
squash
.RS 4
The \*(Aqsquash\*(Aq subcommand merges adjacent commits that have the same author and log text and were made within 5 minutes of each other\&. This can be helpful in cleaning up after migrations from file\-oriented revision control systems, or if a developer has been using a pre\-2006 version of Emacs VC\&. See the embedded help for syntax details\&.
.RE
.PP
strip
.RS 4
Replace content with unique generated cookies on all node paths matching the specified regular expressions; if no expressions are given, match all paths\&. Useful when you need to examine a particularly complex node structure\&.
.RE
.PP
expunge
.RS 4
Delete all operations with Node\-path headers matching specified Python regular expressions\&. Any revision left with no Node records after this filtering has its Revision record removed as well\&.
.RE
.PP
pathrename
.RS 4
Modify Node\-path headers matching a specified Python regular expression; replace with a given string\&. The string may contain Pyton backreferences to parenthesized portions of the pattern\&. See the embedded help for syntax details\&.
.RE
.PP
renumber
.RS 4
Renumber all revisions, patching Node\-copyfrom headers as required\&. Any selection option is ignored\&. Takes no arguments\&.
.RE
.PP
reduce
.RS 4
Strip revisions out of a dump so the only parts left those likely to be relevant to a conversion problem\&. See the embedded help for syntax details and the relevance filter\&.
.RE
.PP
.SH "HISTORY"
.PP
Under the name
\(lqsnvcutter\(rq, an ancestor of this program traveled in the
contrib/
director of the Subversion distribution\&. It had functional overlap with
\fBreposurgeon\fR(1)
because it was directly ancestral to that code\&. It was moved to the
\fBreposurgeon\fR(1)
distribution in January 2016\&.
.PP
.SH "SEE ALSO"
.PP
\fBreposurgeon\fR(1)\&.
.SH "EXAMPLE"
.PP
Suppose you have a Subversion repository with the following semi\-pathological structure:
.sp
.if n \{\
.RS 4
.\}
.nf
Directory1/ (with unrelated content)
Directory2/ (with unrelated content)
TheDirIWantToMigrate/
branches/
crazy\-feature/
UnrelatedApp1/
TheAppIWantToMigrate/
tags/
v1\&.001/
UnrelatedApp1/
UnrelatedApp2/
TheAppIWantToMigrate/
trunk/
UnrelatedApp1/
UnrelatedApp2/
TheAppIWantToMigrate/
.fi
.if n \{\
.RE
.\}
.PP
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:
.sp
.if n \{\
.RS 4
.\}
.nf
repocutter expunge \*(Aq^Directory1\*(Aq \*(Aq^Directory2\*(Aq
repocutter pathrename \*(Aq^TheDirIWantToMigrate/\*(Aq \*(Aq\*(Aq
repocutter expunge \*(Aq^branches/crazy\-feature/UnrelatedApp1/
repocutter pathrename \*(Aqbranches/crazy\-feature/TheAppIWantToMigrate/\*(Aq \*(Aqbranches/crazy\-feature/\*(Aq
repocutter expunge \*(Aq^tags/v1\&.001/UnrelatedApp1/\*(Aq
repocutter expunge \*(Aq^tags/v1\&.001/UnrelatedApp2/\*(Aq
repocutter pathrename \*(Aq^tags/v1\&.001/TheAppIWantToMigrate/\*(Aq \*(Aqtags/v1\&.001/\*(Aq
repocutter expunge \*(Aq^trunk/UnrelatedApp1/\*(Aq
repocutter expunge \*(Aq^trunk/UnrelatedApp2/\*(Aq
repocutter pathrename \*(Aq^trunk/TheAppIWantToMigrate/\*(Aq \*(Aqtrunk/\*(Aq
.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.PP
Eric S\&. Raymond
\&. This tool is distributed with reposurgeon; see the project page at
\m[blue]\fBhttp://www\&.catb\&.org/~esr/reposurgeon\fR\m[]\&.