Rename process_remaining_options() to process_options().
[cvs2svn.git] / cvs2svn.1
blob6073cbda1583adf5783a86dde22b3f763b075ff3
1 .\" Process this file with
2 .\" groff -man -Tascii cvs2svn.1
3 .TH CVS2SVN "1" "Oct 24, 2004" "Subversion" "User Commands"
4 .SH NAME
5 cvs2svn \- convert a cvs repository into a subversion repository
6 .SH SYNOPSIS
7 .B cvs2svn
8 [\fIOPTION\fR]... \fIOUTPUT-OPTION CVS-REPOS-PATH\fR
9 .br
10 .B cvs2svn
11 [\fIOPTION\fR]... \fI--options=PATH\fR
12 .SH DESCRIPTION
13 Create a new Subversion repository based on the version history stored in a
14 CVS repository. Each CVS commit will be mirrored in the Subversion
15 repository, including such information as date of commit and id of the
16 committer.
18 \fICVS-REPOS-PATH\fR is the filesystem path of the part of the CVS
19 repository that you want to convert.  It is not possible to convert a
20 CVS repository to which you only have remote access; see the FAQ for
21 more information.  This path doesn't have to be the top level
22 directory of a CVS repository; it can point at a project within a
23 repository, in which case only that project will be converted.  This
24 path or one of its parent directories has to contain a subdirectory
25 called CVSROOT (though the CVSROOT directory can be empty).
27 Multiple CVS repositories can be converted into a single Subversion
28 repository in a single run of cvs2svn, but only by using an
29 \fB--options\fR file.
30 .SH "OPTIONS FILE"
31 .TP
32 \fB--options\fR=\fIpath\fR
33 Read the conversion options from \fIpath\fR instead of from the
34 command line.  This option allows far more conversion flexibility than
35 can be achieved using the command-line alone.  See the documentation
36 for more information.  Only the following command-line options are
37 allowed in combination with \fB--options\fR: \fB-h\fR/\fB--help\fR,
38 \fB--help-passes\fR, \fB--version\fR, \fB-v\fR/\fB--verbose\fR,
39 \fB-q\fR/\fB--quiet\fR, \fB-p\fR/\fB--pass\fR/\fB--passes\fR,
40 \fB--dry-run\fR, and \fB--profile\fR.
41 .SH "OUTPUT OPTIONS"
42 .TP
43 \fB-s\fR, \fB--svnrepos\fR \fIpath\fR
44 Write the output of the conversion into a Subversion repository
45 located at \fIpath\fR.  This option causes a new Subversion repository
46 to be created at \fIpath\fR unless the \fB--existing-svnrepos\fR
47 option is also used.
48 .TP
49 \fB--existing-svnrepos\fR
50 Load the converted CVS repository into an existing Subversion
51 repository, instead of creating a new repository.  (This option should
52 be used in combination with \fB-s\fR/\fB--svnrepos\fR.)  The
53 repository must either be empty or contain no paths that overlap with
54 those that will result from the conversion.  Please note that you need
55 write permission for the repository files.
56 .TP
57 \fB--fs-type\fR
58 Pass \fI--fs-type\fR=\fItype\fR to "svnadmin create" when creating a
59 new repository.
60 .TP
61 \fB--bdb-txn-nosync\fR
62 Pass \fI--bdb-txn-nosync\fR to "svnadmin create" when creating a new
63 BDB-style Subversion repository.
64 .TP
65 \fB--create-option\fR=\fIopt\fR
66 Pass \fIopt\fR to "svnadmin create" when creating a new Subversion
67 repository (can be specified multiple times to pass multiple options).
68 .TP
69 \fB--dumpfile\fR=\fIpath\fR
70 Just produce a dumpfile; don't commit to an SVN repository.  Write the
71 dumpfile to \fIpath\fR.
72 .TP
73 \fB--dry-run\fR
74 Do not create a repository or a dumpfile; just print the details of what
75 cvs2svn would do if it were really converting your repository.
76 .SH "CONVERSION OPTIONS"
77 .TP
78 \fB--trunk-only\fR
79 Convert only trunk commits, not tags nor branches.
80 .TP
81 \fB--trunk\fR=\fIpath\fR
82 Set the top-level path to use for trunk in the Subversion repository.
83 The default is \fItrunk\fR.
84 .TP
85 \fB--branches\fR=\fIpath\fR
86 Set the top-level path to use for branches in the Subversion
87 repository.  The default is \fIbranches\fR.
88 .TP
89 \fB--tags\fR=\fIpath\fR
90 Set the top-level path to use for tags in the Subversion repository.
91 The default is \fItags\fR.
92 .TP
93 \fB--no-prune\fR
94 When all files are deleted from a directory in the Subversion
95 repository, don't delete the empty directory (the default is to delete
96 any empty directories.
97 .TP
98 \fB--encoding\fR=\fIencoding\fR
99 Use \fIencoding\fR as the encoding for filenames, log messages, and
100 author names in the CVS repos.  This option may be specified
101 multiple times, in which case the encodings are tried in order
102 until one succeeds.  Default: ascii.  See
103 http://docs.python.org/lib/standard-encodings.html for a list of other
104 standard encodings.
106 \fB--fallback-encoding\fR=\fIencoding\fR
107 If none of the encodings specified with \fB--encoding\fR succeed in
108 decoding an author name or log message, then fall back to using
109 \fIencoding\fR in lossy 'replace' mode.  Use of this option may cause
110 information to be lost, but at least it allows the conversion to run
111 to completion.  This option only affects the encoding of log messages
112 and author names; there is no fallback encoding for filenames.  (By
113 using an \fB--options\fR file, it is possible to specify a fallback
114 encoding for filenames.)  Default: disabled.
116 \fB--no-cross-branch-commits\fR
117 Prevent the creation of commits that affect files on multiple
118 branches at once.
120 \fB--retain-conflicting-attic-files\fR
121 If a file appears both inside an outside of the CVS attic, retain the
122 attic version in an SVN subdirectory called `Attic'.  (Normally this
123 situation is treated as a fatal error.)
124 .SH "SYMBOL HANDLING"
126 \fB--symbol-transform\fR=\fIpattern\fR:\fIreplacement\fR
127 Transform RCS/CVS symbol names before entering them into Subversion.
128 \fIpattern\fR is a Python regexp pattern that is matches against the
129 entire symbol name; \fIreplacement\fR is a replacement using Python's
130 regexp reference syntax.  You may specify any number of these options;
131 they will be applied in the order given on the command line.
133 \fB--symbol-hints\fR=\fIpath\fR
134 Read symbol conversion hints from \fIpath\fR.  The format of
135 \fIpath\fR is the same as the format output by
136 \fB--write-symbol-info\fR, namely a text file with four
137 whitespace-separated columns: \fIproject-id\fR, \fIsymbol\fR,
138 \fIconversion\fR, and \fIparent-lod-name\fR.  \fIproject-id\fR is
139 the numerical ID of the project to which the symbol belongs, counting
140 from 0.  \fIproject-id\fR can be set to '.' if project-specificity is
141 not needed.  \fIsymbol-name\fR is the name of the symbol being
142 specified.  \fIconversion\fR specifies how the symbol should be
143 converted, and can be one of the values 'branch', 'tag', or 'exclude'.
144 If \fIconversion\fR is '.', then this rule does not affect how the
145 symbol is converted.  \fIparent-lod-name\fR is the name of the symbol
146 from which this symbol should sprout, or '.trunk.' if the symbol
147 should sprout from trunk.  If \fIparent-lod-name\fR is omitted or '.',
148 then this rule does not affect the preferred parent of this symbol.
149 The file may contain blank lines or comment lines (lines whose first
150 non-whitespace character is '#').
152 \fB--symbol-default\fR=\fIopt\fR
153 Specify how to convert ambiguous symbols (those that appear in the CVS
154 archive as both branches and tags).  \fIopt\fR must be `heuristic'
155 (decide how to treat each ambiguous symbol based on whether it was
156 used more often as a branch/tag in CVS), `strict' (no default; every
157 ambiguous symbol has to be resolved manually using
158 \fB--force-branch\fR, \fB--force-tag\fR, or \fB--exclude\fR), `branch'
159 (treat every ambiguous symbol as a branch), or `tag' (treat every
160 ambiguous symbol as a tag).  The default is `heuristic'.
162 \fB--force-branch\fR=\fIregexp\fR
163 Force symbols whose names match \fIregexp\fR to be branches.
164 \fIregexp\fR must match the whole symbol name.
166 \fB--force-tag\fR=\fIregexp\fR
167 Force symbols whose names match \fIregexp\fR to be tags.  \fIregexp\fR
168 must match the whole symbol name.
170 \fB--exclude\fR=\fIregexp\fR
171 Exclude branches and tags whose names match \fIregexp\fR from the
172 conversion.  \fIregexp\fR must match the whole symbol name.
174 \fB--keep-trivial-imports\fR
175 Do not exclude branches that were only used for a single import.  (By
176 default such branches are excluded because they are usually created by
177 the inappropriate use of \fBcvs import\fR.)
178 .SH "SUBVERSION PROPERTIES"
180 \fB--username\fR=\fIname\fR
181 Set the default username to \fIname\fR when cvs2svn needs to generate
182 a commit for which CVS does not record the original username.  This
183 happens when a branch or tag is created.  The default is to use no
184 author at all for such commits.
186 \fB--auto-props\fR=\fIfile\fR
187 Specify a file in the format of Subversion's config file, whose
188 [auto-props] section can be used to set arbitrary properties on files
189 in the Subversion repository based on their filenames.  (The
190 [auto-props] section header must be present; other sections of the
191 config file, including the enable-auto-props setting, are ignored.)
192 Filenames are matched to the filename patterns case-insensitively.
194 \fB--mime-types\fR=\fIfile\fR
195 Specify an apache-style mime.types \fIfile\fR for setting
196 svn:mime-type.
198 \fB--eol-from-mime-type\fR
199 For files that don't have the kb expansion mode but have a known mime
200 type, set the eol-style based on the mime type.  For such files, set
201 svn:eol-style to "native" if the mime type begins with "text/", and
202 leave it unset (i.e., no EOL translation) otherwise.  Files with
203 unknown mime types are not affected by this option.  This option has
204 no effect unless the \fB--mime-types\fR option is also specified.
206 \fB--default-eol\fR=\fIstyle\fR
207 Set svn:eol-style to \fIstyle\fR for files that don't have the CVS
208 `kb' expansion mode and whose end-of-line translation mode hasn't been
209 determined by one of the other options.  \fIstyle\fR must be `binary'
210 (default), `native', `CRLF', `LF', or `CR'.
212 \fB--keywords-off\fR
213 By default, cvs2svn sets svn:keywords on CVS files to "author id date"
214 if the mode of the RCS file in question is either kv, kvl or unset.
215 If you use the --keywords-off switch, cvs2svn will not set
216 svn:keywords for any file.  While this will not touch the keywords in
217 the contents of your files, Subversion will not expand them.
219 \fB--keep-cvsignore\fR
220 Include \fI.cvsignore\fR files in the output.  (Normally they are
221 unneeded because cvs2svn sets the corresponding \fIsvn:ignore\fR
222 properties.)
224 \fB--cvs-revnums\fR
225 Record CVS revision numbers as file properties in the Subversion
226 repository.  (Note that unless it is removed explicitly, the last CVS
227 revision number will remain associated with the file even after the
228 file is changed within Subversion.)
229 .SH "EXTRACTION OPTIONS"
231 \fB--use-rcs\fR
232 Use RCS 'co' to extract revision contents.
234 \fB--use-cvs\fR
235 Use CVS to extract revision contents (only use this if having
236 problems with \fB--use-internal-co\fR or \fB--use-rcs\fR, as those
237 options are much faster).
239 \fB--use-internal-co\fR
240 Use internal code to extract revision contents.  This is up to 50%
241 faster than using \fB--use-rcs\fR, but needs a lot of disk space:
242 Roughly the size of your CVS repository plus the peak size of a
243 complete checkout of the repository with all branches that existed and
244 still had commits pending at a given time.  This option is the
245 default.
246 .SH "ENVIRONMENT OPTIONS"
248 \fB--tmpdir\fR=\fIpath\fR
249 Set the \fIpath\fR to use for temporary data.  Default is a directory
250 called \fIcvs2svn-tmp\fR under the current directory.
252 \fB--svnadmin\fR=\fIpath\fR
253 Path to the \fIsvnadmin\fR program.  (\fIsvnadmin\fR is needed when
254 the \fB-s\fR/\fB--svnrepos\fR output option is used.)
256 \fB--co\fR=\fIpath\fR
257 Path to the \fIco\fR program.  (\fIco\fR is needed if the
258 \fB--use-rcs\fR option is used.)
260 \fB--cvs\fR=\fIpath\fR
261 Path to the \fIcvs\fR program.  (\fIcvs\fR is needed if the
262 \fB--use-cvs\fR option is used.)
264 \fB--sort\fR=\fIpath\fR
265 Path to the GNU \fIsort\fR program.  (cvs2svn requires GNU sort.)
266 .SH "PARTIAL CONVERSIONS"
268 \fB-p\fR, \fB--pass\fR \fIpass\fR
269 Execute only pass \fIpass\fR of the conversion.  \fIpass\fR can be
270 specified by name or by number (see \fB--help-passes\fR).
272 \fB-p\fR, \fB--passes\fR [\fIstart\fR]:[\fIend\fR]
273 Execute passes \fIstart\fR through \fIend\fR of the conversion
274 (inclusive).  \fIstart\fR and \fIend\fR can be specified by name or by
275 number (see \fB--help-passes\fR).  If \fIstart\fR or \fIend\fR is
276 missing, it defaults to the first or last pass, respectively.  For
277 this to work the earlier passes must have been completed before on the
278 same CVS repository, and the generated data files must be in the
279 temporary directory (see \fB--tmpdir\fR).
280 .SH "INFORMATION OPTIONS"
282 \fB--version\fR
283 Print the version number.
285 \fB-h\fR, \fB--help\fR
286 Print the usage message and exit with success.
288 \fB--help-passes\fR
289 Print the numbers and names of the conversion passes and exit with
290 success.
292 \fB-v\fR, \fB--verbose\fR
293 Print more information while running.  This option may be specified
294 twice to output voluminous debugging information.
296 \fB-q\fR, \fB--quiet\fR
297 Print less information while running.  This option may be specified
298 twice to suppress all non-error output.
300 \fB--write-symbol-info\fR=\fIpath\fR
301 Write symbol statistics and information about how symbols were
302 converted to \fIpath\fR during CollateSymbolsPass.
304 \fB--skip-cleanup\fR
305 Prevent the deletion of temporary files.
307 \fB--profile\fR
308 Profile with 'hotshot' (into file \fIcvs2svn.hotshot\fR).
309 .SH FILES
310 A directory called \fIcvs2svn-tmp\fR (or the directory specified by
311 \fB--tmpdir\fR) is used as scratch space for temporary data files.
312 .SH AUTHORS
313 Main authors are:
315 C. Michael Pilato <cmpilato@collab.net>
317 Greg Stein <gstein@lyra.org>
319 Branko Čibej <brane@xbc.nu>
321 Blair Zajac <blair@orcaware.com>
323 Max Bowsher <maxb@ukf.net>
325 Brian Fitzpatrick <fitz@red-bean.com>
327 Tobias Ringström <tobias@ringstrom.mine.nu>
329 Karl Fogel <kfogel@collab.net>
331 Erik Hülsmann <e.huelsmann@gmx.net>
333 David Summers <david@summersoft.fay.ar.us>
335 Michael Haggerty <mhagger@alum.mit.edu>
337 Manpage was written for the Debian GNU/Linux system by
338 Laszlo 'GCS' Boszormenyi <gcs@lsc.hu> (but may be used by others).
339 .SH SEE ALSO
340 cvs(1), svn(1), svnadmin(1)