1REPOCUTTER(1) Development Tools REPOCUTTER(1)
2
3
4
6 repocutter - surgical and filtering operations on Subversion dump files
7
9 repocutter [-q] [-r selection] subcommand
10
12 This program does surgical and filtering operations on Subversion dump
13 files. While it is is not as flexible as reposurgeon(1), it can perform
14 Subversion-specific transformations that reposurgeon cannot, and can be
15 useful for processing Subversion repositories into a form suitable for
16 conversion.
17
18 (As a matter of possible historical interest, the reason for the
19 partial functional overlap between repocutter and reposurgeon is that
20 repocutter was first written earlier and became a testbed for some of
21 the design concepts in reposurgeon. After reposurgeon was written, the
22 author learned that it could not naturally support some useful
23 operations very specific to Subversion, and enhanced repocutter to do
24 those.)
25
26 In all commands, the -r (or --range) option limits the selection of
27 revisions over which an operation will be performed. A selection
28 consists of one or more comma-separated ranges. A range may consist of
29 an integer revision number or the special name HEAD for the head
30 revision. Or it may be a colon-separated pair of integers, or an
31 integer followed by a colon followed by HEAD.
32
33 Normally, each subcommand produces a progress spinner on standard
34 error; each turn means another revision has been filtered. The -q (or
35 --quiet) option suppresses this.
36
37 Generally, if you need to use this program at all, you will find that
38 you need to pipe your dump file through multiple instances of it doing
39 one kind of operation each. This is not as expensive as it sounds; with
40 the exception of the reduce subcommand, the working set of this program
41 is bounded by the size of the largest commit metadata item. It does not
42 need to hold the entire repo metadata in memory.
43
44 The following subcommands are available:
45
46 help
47 Without arguments, list available commands. With a command-name
48 argument, show detailed help for that subcommand.
49
50 select
51 The 'select' subcommand selects a range and permits only revisions
52 in that range to pass to standard output. A range beginning with 0
53 includes the dumpfile header.
54
55 propset
56 Set a property to a value. May be restricted by a revision
57 selection. You may specify multiple property settings. See the
58 embedded help for syntax details.
59
60 propdel
61 Delete the named property. May be restricted by a revision
62 selection. You may specify multiple properties to be deleted. See
63 the embedded help for syntax details.
64
65 proprename
66 Rename a property. May be restricted by a revision selection. You
67 may specify multiple properties to be renamed. See the embedded
68 help for syntax details.
69
70 log
71 enerate a log report, same format as the output of svn log on a
72 repository, to standard output.
73
74 setlog
75 Replace the log entries in the input dumpfile with the
76 corresponding entries in a specified file, which should be in the
77 format of an svn log output. Replacements may be restricted to a
78 specified range. See the embedded help for syntax details.
79
80 squash
81 The 'squash' subcommand merges adjacent commits that have the same
82 author and log text and were made within 5 minutes of each other.
83 This can be helpful in cleaning up after migrations from
84 file-oriented revision control systems, or if a developer has been
85 using a pre-2006 version of Emacs VC. See the embedded help for
86 syntax details.
87
88 strip
89 Replace content with unique generated cookies on all node paths
90 matching the specified regular expressions; if no expressions are
91 given, match all paths. Useful when you need to examine a
92 particularly complex node structure.
93
94 expunge
95 Delete all operations with Node-path headers matching specified
96 Python regular expressions. Any revision left with no Node records
97 after this filtering has its Revision record removed as well.
98
99 pathrename
100 Modify Node-path and Node-copyfrom-path headers matching a
101 specified Python regular expression; replace with a given string.
102 The string may contain Python backreferences to parenthesized
103 portions of the pattern. See the embedded help for syntax details.
104
105 renumber
106 Renumber all revisions, patching Node-copyfrom headers as required.
107 Any selection option is ignored. Takes no arguments.
108
109 reduce
110 Strip revisions out of a dump so the only parts left those likely
111 to be relevant to a conversion problem. See the embedded help for
112 syntax details and the relevance filter.
113
115 Under the name “snvcutter”, an ancestor of this program traveled in the
116 contrib/ director of the Subversion distribution. It had functional
117 overlap with reposurgeon(1) because it was directly ancestral to that
118 code. It was moved to the reposurgeon(1) distribution in January 2016.
119
121 reposurgeon(1).
122
124 Suppose you have a Subversion repository with the following
125 semi-pathological structure:
126
127 Directory1/ (with unrelated content)
128 Directory2/ (with unrelated content)
129 TheDirIWantToMigrate/
130 branches/
131 crazy-feature/
132 UnrelatedApp1/
133 TheAppIWantToMigrate/
134 tags/
135 v1.001/
136 UnrelatedApp1/
137 UnrelatedApp2/
138 TheAppIWantToMigrate/
139 trunk/
140 UnrelatedApp1/
141 UnrelatedApp2/
142 TheAppIWantToMigrate/
143
144 You want to transform the dump file so that TheAppIWantToMigrate can be
145 subject to a regular branchy lift. A way to dissect out the code of
146 interest would be with the following series of filters applied:
147
148 repocutter expunge '^Directory1' '^Directory2'
149 repocutter pathrename '^TheDirIWantToMigrate/' ''
150 repocutter expunge '^branches/crazy-feature/UnrelatedApp1/
151 repocutter pathrename 'branches/crazy-feature/TheAppIWantToMigrate/' 'branches/crazy-feature/'
152 repocutter expunge '^tags/v1.001/UnrelatedApp1/'
153 repocutter expunge '^tags/v1.001/UnrelatedApp2/'
154 repocutter pathrename '^tags/v1.001/TheAppIWantToMigrate/' 'tags/v1.001/'
155 repocutter expunge '^trunk/UnrelatedApp1/'
156 repocutter expunge '^trunk/UnrelatedApp2/'
157 repocutter pathrename '^trunk/TheAppIWantToMigrate/' 'trunk/'
158
160 Eric S. Raymond <esr@thyrsus.com>. This tool is distributed with
161 reposurgeon; see the project page at
162 http://www.catb.org/~esr/reposurgeon.
163
164
165
166repocutter 03/31/2019 REPOCUTTER(1)