1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">
\r
4 <sect2 lang="en" id="git-cvsimport(1)">
\r
5 <title>git-cvsimport(1)</title>
\r
7 <primary>git-cvsimport(1)</primary>
\r
9 <simplesect id="git-cvsimport(1)__name">
\r
11 <simpara>git-cvsimport - Salvage your data out of another SCM people love to hate</simpara>
\r
13 <simplesect id="git-cvsimport(1)__synopsis">
\r
14 <title>SYNOPSIS</title>
\r
16 <literallayout><emphasis>git cvsimport</emphasis> [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>]
\r
17 [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]
\r
18 [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]
\r
19 [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]
\r
20 [-r <remote>] [-R] [<CVS_module>]</literallayout>
\r
23 <simplesect id="git-cvsimport(1)__description">
\r
24 <title>DESCRIPTION</title>
\r
25 <simpara><emphasis role="strong">WARNING:</emphasis> <emphasis>git cvsimport</emphasis> uses cvsps version 2, which is considered
\r
26 deprecated; it does not work with cvsps version 3 and later. If you are
\r
27 performing a one-shot import of a CVS repository consider using
\r
28 <ulink url="http://cvs2svn.tigris.org/cvs2git.html">cvs2git</ulink> or
\r
29 <ulink url="http://www.catb.org/esr/cvs-fast-export/">cvs-fast-export</ulink>.</simpara>
\r
30 <simpara>Imports a CVS repository into Git. It will either create a new
\r
31 repository, or incrementally import into an existing one.</simpara>
\r
32 <simpara>Splitting the CVS log into patch sets is done by <emphasis>cvsps</emphasis>.
\r
33 At least version 2.1 is required.</simpara>
\r
34 <simpara><emphasis role="strong">WARNING:</emphasis> for certain situations the import leads to incorrect results.
\r
35 Please see the section <link linkend="git-cvsimport(1)_issues">ISSUES</link> for further reference.</simpara>
\r
36 <simpara>You should <emphasis role="strong">never</emphasis> do any work of your own on the branches that are
\r
37 created by <emphasis>git cvsimport</emphasis>. By default initial import will create and populate a
\r
38 "master" branch from the CVS repository's main branch which you're free
\r
39 to work with; after that, you need to <emphasis>git merge</emphasis> incremental imports, or
\r
40 any CVS branches, yourself. It is advisable to specify a named remote via
\r
41 -r to separate and protect the incoming branches.</simpara>
\r
42 <simpara>If you intend to set up a shared public repository that all developers can
\r
43 read/write, or if you want to use <xref linkend="git-cvsserver(1)" />, then you
\r
44 probably want to make a bare clone of the imported repository,
\r
45 and use the clone as the shared repository.
\r
46 See <xref linkend="gitcvs-migration(7)" />.</simpara>
\r
48 <simplesect id="git-cvsimport(1)__options">
\r
49 <title>OPTIONS</title>
\r
57 Verbosity: let <emphasis>cvsimport</emphasis> report what it is doing.
\r
67 The root of the CVS archive. May be local (a simple path) or remote;
\r
68 currently, only the :local:, :ext: and :pserver: access methods
\r
69 are supported. If not given, <emphasis>git cvsimport</emphasis> will try to read it
\r
70 from <emphasis>CVS/Root</emphasis>. If no such file exists, it checks for the
\r
71 <emphasis>CVSROOT</emphasis> environment variable.
\r
81 The CVS module you want to import. Relative to <CVSROOT>.
\r
82 If not given, <emphasis>git cvsimport</emphasis> tries to read it from
\r
83 <emphasis>CVS/Repository</emphasis>.
\r
89 -C <target-dir>
\r
93 The Git repository to import to. If the directory doesn't
\r
94 exist, it will be created. Default is the current directory.
\r
104 The Git remote to import this CVS repository into.
\r
105 Moves all CVS branches into remotes/<remote>/<branch>
\r
106 akin to the way <emphasis>git clone</emphasis> uses <emphasis>origin</emphasis> by default.
\r
112 -o <branch-for-HEAD>
\r
116 When no remote is specified (via -r) the <emphasis>HEAD</emphasis> branch
\r
117 from CVS is imported to the <emphasis>origin</emphasis> branch within the Git
\r
118 repository, as <emphasis>HEAD</emphasis> already has a special meaning for Git.
\r
119 When a remote is specified the <emphasis>HEAD</emphasis> branch is named
\r
120 remotes/<remote>/master mirroring <emphasis>git clone</emphasis> behaviour.
\r
121 Use this option if you want to import into a different
\r
124 <simpara>Use <emphasis>-o master</emphasis> for continuing an import that was initially done by
\r
125 the old cvs2git tool.</simpara>
\r
134 Import-only: don't perform a checkout after importing. This option
\r
135 ensures the working directory and index remain untouched and will
\r
136 not create them if they do not exist.
\r
146 Kill keywords: will extract files with <emphasis>-kk</emphasis> from the CVS archive
\r
147 to avoid noisy changesets. Highly recommended, but off by default
\r
148 to preserve compatibility with early imported trees.
\r
158 Convert underscores in tag and branch names to dots.
\r
168 Substitute the character "/" in branch names with <subst>
\r
174 -p <options-for-cvsps>
\r
178 Additional options for cvsps.
\r
179 The options <emphasis>-u</emphasis> and <emphasis>-A</emphasis> are implicit and should not be used here.
\r
181 <simpara>If you need to pass multiple options, separate them with a comma.</simpara>
\r
190 Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
\r
191 cvsps defaults to 300s.
\r
197 -P <cvsps-output-file>
\r
201 Instead of calling cvsps, read the provided cvsps output file. Useful
\r
202 for debugging or when cvsps is being handled outside cvsimport.
\r
212 Attempt to detect merges based on the commit message. This option
\r
213 will enable default regexes that try to capture the source
\r
214 branch name from the commit message.
\r
224 Attempt to detect merges based on the commit message with a custom
\r
225 regex. It can be used with <emphasis>-m</emphasis> to enable the default regexes
\r
226 as well. You must escape forward slashes.
\r
228 <simpara>The regex must capture the source branch name in $1.</simpara>
\r
229 <simpara>This option can be used several times to provide several detection regexes.</simpara>
\r
238 Skip paths matching the regex.
\r
248 Import all commits, including recent ones. cvsimport by default
\r
249 skips commits that have a timestamp less than 10 minutes ago.
\r
259 Limit the number of commits imported. Workaround for cases where
\r
260 cvsimport leaks memory.
\r
266 -A <author-conv-file>
\r
270 CVS by default uses the Unix username when writing its
\r
271 commit logs. Using this option and an author-conv-file
\r
272 maps the name recorded in CVS to author name, e-mail and
\r
273 optional time zone:
\r
275 <screen> exon=Andreas Ericsson <ae@op5.se>
\r
276 spawn=Simon Pawn <spawn@frog-pond.org> America/Chicago</screen>
\r
277 <simpara><emphasis>git cvsimport</emphasis> will make it appear as those authors had
\r
278 their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
\r
279 all along. If a time zone is specified, GIT_AUTHOR_DATE will
\r
280 have the corresponding offset applied.</simpara>
\r
281 <simpara>For convenience, this data is saved to <emphasis>$GIT_DIR/cvs-authors</emphasis>
\r
282 each time the <emphasis>-A</emphasis> option is provided and read from that same
\r
283 file each time <emphasis>git cvsimport</emphasis> is run.</simpara>
\r
284 <simpara>It is not recommended to use this feature if you intend to
\r
285 export changes back to CVS again later with
\r
286 <emphasis>git cvsexportcommit</emphasis>.</simpara>
\r
295 Generate a <emphasis>$GIT_DIR/cvs-revisions</emphasis> file containing a mapping from CVS
\r
296 revision numbers to newly-created Git commit IDs. The generated file
\r
297 will contain one line for each (filename, revision) pair imported;
\r
298 each line will look like
\r
300 <screen>src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7</screen>
\r
301 <simpara>The revision data is appended to the file if it already exists, for use when
\r
302 doing incremental imports.</simpara>
\r
303 <simpara>This option may be useful if you have CVS revision numbers stored in commit
\r
304 messages, bug-tracking systems, email archives, and the like.</simpara>
\r
313 Print a short usage message and exit.
\r
319 <simplesect id="git-cvsimport(1)__output">
\r
320 <title>OUTPUT</title>
\r
321 <simpara>If <emphasis>-v</emphasis> is specified, the script reports what it is doing.</simpara>
\r
322 <simpara>Otherwise, success is indicated the Unix way, i.e. by simply exiting with
\r
323 a zero exit status.</simpara>
\r
325 <simplesect id="git-cvsimport(1)_issues">
\r
326 <title>ISSUES</title>
\r
327 <simpara>Problems related to timestamps:</simpara>
\r
331 If timestamps of commits in the CVS repository are not stable enough
\r
332 to be used for ordering commits changes may show up in the wrong
\r
338 If any files were ever "cvs import"ed more than once (e.g., import of
\r
339 more than one vendor release) the HEAD contains the wrong content.
\r
344 If the timestamp order of different files cross the revision order
\r
345 within the commit matching time window the order of commits may be
\r
350 <simpara>Problems related to branches:</simpara>
\r
354 Branches on which no commits have been made are not imported.
\r
359 All files from the branching point are added to a branch even if
\r
360 never added in CVS.
\r
365 This applies to files added to the source branch <emphasis role="strong">after</emphasis> a daughter
\r
366 branch was created: if previously no commit was made on the daughter
\r
367 branch they will erroneously be added to the daughter branch in git.
\r
371 <simpara>Problems related to tags:</simpara>
\r
375 Multiple tags on the same revision are not imported.
\r
379 <simpara>If you suspect that any of these issues may apply to the repository you
\r
380 want to import, consider using cvs2git:</simpara>
\r
384 cvs2git (part of cvs2svn), <emphasis>http://subversion.apache.org/</emphasis>
\r
389 <simplesect id="git-cvsimport(1)__git">
\r
391 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r