1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
\r
4 <article lang="en" id="git-cvsimport(1)">
\r
6 <title>git-cvsimport(1)</title>
\r
8 <primary>git-cvsimport(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-cvsimport - Salvage your data out of another SCM people love to hate</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git cvsimport</emphasis> [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>]
\r
19 [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]
\r
20 [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]
\r
21 [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]
\r
22 [-r <remote>] [<CVS_module>]</literallayout>
\r
25 <simplesect id="_description">
\r
26 <title>DESCRIPTION</title>
\r
27 <simpara>Imports a CVS repository into git. It will either create a new
\r
28 repository, or incrementally import into an existing one.</simpara>
\r
29 <simpara>Splitting the CVS log into patch sets is done by <emphasis>cvsps</emphasis>.
\r
30 At least version 2.1 is required.</simpara>
\r
31 <simpara>You should <emphasis role="strong">never</emphasis> do any work of your own on the branches that are
\r
32 created by <emphasis>git-cvsimport</emphasis>. By default initial import will create and populate a
\r
33 "master" branch from the CVS repository’s main branch which you’re free
\r
34 to work with; after that, you need to <emphasis>git-merge</emphasis> incremental imports, or
\r
35 any CVS branches, yourself. It is advisable to specify a named remote via
\r
36 -r to separate and protect the incoming branches.</simpara>
\r
37 <simpara>If you intend to set up a shared public repository that all developers can
\r
38 read/write, or if you want to use <xref linkend="git-cvsserver(1)"/>, then you
\r
39 probably want to make a bare clone of the imported repository,
\r
40 and use the clone as the shared repository.
\r
41 See <xref linkend="gitcvs-migration(7)"/>.</simpara>
\r
43 <simplesect id="_options">
\r
44 <title>OPTIONS</title>
\r
52 Verbosity: let <emphasis>cvsimport</emphasis> report what it is doing.
\r
62 The root of the CVS archive. May be local (a simple path) or remote;
\r
63 currently, only the :local:, :ext: and :pserver: access methods
\r
64 are supported. If not given, <emphasis>git-cvsimport</emphasis> will try to read it
\r
65 from <literal>CVS/Root</literal>. If no such file exists, it checks for the
\r
66 <literal>CVSROOT</literal> environment variable.
\r
76 The CVS module you want to import. Relative to <CVSROOT>.
\r
77 If not given, <emphasis>git-cvsimport</emphasis> tries to read it from
\r
78 <literal>CVS/Repository</literal>.
\r
84 -C <target-dir>
\r
88 The git repository to import to. If the directory doesn’t
\r
89 exist, it will be created. Default is the current directory.
\r
99 The git remote to import this CVS repository into.
\r
100 Moves all CVS branches into remotes/<remote>/<branch>
\r
101 akin to the <emphasis>git-clone</emphasis> "--use-separate-remote" option.
\r
107 -o <branch-for-HEAD>
\r
111 When no remote is specified (via -r) the <emphasis>HEAD</emphasis> branch
\r
112 from CVS is imported to the <emphasis>origin</emphasis> branch within the git
\r
113 repository, as <emphasis>HEAD</emphasis> already has a special meaning for git.
\r
114 When a remote is specified the <emphasis>HEAD</emphasis> branch is named
\r
115 remotes/<remote>/master mirroring <emphasis>git-clone</emphasis> behaviour.
\r
116 Use this option if you want to import into a different
\r
119 <simpara>Use <emphasis>-o master</emphasis> for continuing an import that was initially done by
\r
120 the old cvs2git tool.</simpara>
\r
129 Import-only: don’t perform a checkout after importing. This option
\r
130 ensures the working directory and index remain untouched and will
\r
131 not create them if they do not exist.
\r
141 Kill keywords: will extract files with <emphasis>-kk</emphasis> from the CVS archive
\r
142 to avoid noisy changesets. Highly recommended, but off by default
\r
143 to preserve compatibility with early imported trees.
\r
153 Convert underscores in tag and branch names to dots.
\r
163 Substitute the character "/" in branch names with <subst>
\r
169 -p <options-for-cvsps>
\r
173 Additional options for cvsps.
\r
174 The options <emphasis>-u</emphasis> and <emphasis>-A</emphasis> are implicit and should not be used here.
\r
176 <simpara>If you need to pass multiple options, separate them with a comma.</simpara>
\r
185 Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
\r
186 cvsps defaults to 300s.
\r
192 -P <cvsps-output-file>
\r
196 Instead of calling cvsps, read the provided cvsps output file. Useful
\r
197 for debugging or when cvsps is being handled outside cvsimport.
\r
207 Attempt to detect merges based on the commit message. This option
\r
208 will enable default regexes that try to capture the source
\r
209 branch name from the commit message.
\r
219 Attempt to detect merges based on the commit message with a custom
\r
220 regex. It can be used with <emphasis>-m</emphasis> to enable the default regexes
\r
221 as well. You must escape forward slashes.
\r
223 <simpara>The regex must capture the source branch name in $1.</simpara>
\r
224 <simpara>This option can be used several times to provide several detection regexes.</simpara>
\r
233 Skip paths matching the regex.
\r
243 Import all commits, including recent ones. cvsimport by default
\r
244 skips commits that have a timestamp less than 10 minutes ago.
\r
254 Limit the number of commits imported. Workaround for cases where
\r
255 cvsimport leaks memory.
\r
261 -A <author-conv-file>
\r
265 CVS by default uses the Unix username when writing its
\r
266 commit logs. Using this option and an author-conv-file
\r
269 <literallayout> exon=Andreas Ericsson <ae@op5.se>
\r
270 spawn=Simon Pawn <spawn@frog-pond.org></literallayout>
\r
271 <simpara><emphasis>git-cvsimport</emphasis> will make it appear as those authors had
\r
272 their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
\r
273 all along.</simpara>
\r
274 <simpara>For convenience, this data is saved to <literal>$GIT_DIR/cvs-authors</literal>
\r
275 each time the <emphasis>-A</emphasis> option is provided and read from that same
\r
276 file each time <emphasis>git-cvsimport</emphasis> is run.</simpara>
\r
277 <simpara>It is not recommended to use this feature if you intend to
\r
278 export changes back to CVS again later with
\r
279 <emphasis>git-cvsexportcommit</emphasis>.</simpara>
\r
288 Print a short usage message and exit.
\r
294 <simplesect id="_output">
\r
295 <title>OUTPUT</title>
\r
296 <simpara>If <emphasis>-v</emphasis> is specified, the script reports what it is doing.</simpara>
\r
297 <simpara>Otherwise, success is indicated the Unix way, i.e. by simply exiting with
\r
298 a zero exit status.</simpara>
\r
300 <simplesect id="_author">
\r
301 <title>Author</title>
\r
302 <simpara>Written by Matthias Urlichs <<ulink url="mailto:smurf@smurf.noris.de">smurf@smurf.noris.de</ulink>>, with help from
\r
303 various participants of the git-list <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>>.</simpara>
\r
305 <simplesect id="_documentation">
\r
306 <title>Documentation</title>
\r
307 <simpara>Documentation by Matthias Urlichs <<ulink url="mailto:smurf@smurf.noris.de">smurf@smurf.noris.de</ulink>>.</simpara>
\r
309 <simplesect id="_git">
\r
311 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
\r