blob: e0be8565468c0b278147abc3e83eb7d19f481a40 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-cvsimport(1)
2================
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-cvsimport - Salvage your data out of another SCM people love to hate
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano235a91e2006-01-07 01:13:5811[verse]
Junio C Hamano12a3a232007-04-07 10:18:1012'git-cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>]
13 [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]
14 [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]
15 [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]
16 [<CVS_module>]
Junio C Hamano1a4e8412005-12-27 08:17:2317
18
19DESCRIPTION
20-----------
21Imports a CVS repository into git. It will either create a new
22repository, or incrementally import into an existing one.
23
24Splitting the CVS log into patch sets is done by 'cvsps'.
25At least version 2.1 is required.
26
Junio C Hamano04a32862006-03-08 01:42:4327You should *never* do any work of your own on the branches that are
28created by git-cvsimport. The initial import will create and populate a
29"master" branch from the CVS repository's main branch which you're free
30to work with; after that, you need to 'git merge' incremental imports, or
31any CVS branches, yourself.
32
Junio C Hamano1a4e8412005-12-27 08:17:2333OPTIONS
34-------
Junio C Hamano12a3a232007-04-07 10:18:1035-v::
36Verbosity: let 'cvsimport' report what it is doing.
37
Junio C Hamano1a4e8412005-12-27 08:17:2338-d <CVSROOT>::
39The root of the CVS archive. May be local (a simple path) or remote;
40currently, only the :local:, :ext: and :pserver: access methods
Junio C Hamano12a3a232007-04-07 10:18:1041are supported. If not given, git-cvsimport will try to read it
42from `CVS/Root`. If no such file exists, it checks for the
43`CVSROOT` environment variable.
44
45<CVS_module>::
46The CVS module you want to import. Relative to <CVSROOT>.
47If not given, git-cvsimport tries to read it from
48`CVS/Repository`.
Junio C Hamano1a4e8412005-12-27 08:17:2349
50-C <target-dir>::
51 The git repository to import to. If the directory doesn't
52 exist, it will be created. Default is the current directory.
53
Junio C Hamano1a4e8412005-12-27 08:17:2354-o <branch-for-HEAD>::
55The 'HEAD' branch from CVS is imported to the 'origin' branch within
56the git repository, as 'HEAD' already has a special meaning for git.
57Use this option if you want to import into a different branch.
58+
59Use '-o master' for continuing an import that was initially done by
60the old cvs2git tool.
61
Junio C Hamano12a3a232007-04-07 10:18:1062-i::
63Import-only: don't perform a checkout after importing. This option
64ensures the working directory and index remain untouched and will
65not create them if they do not exist.
66
67-k::
68Kill keywords: will extract files with '-kk' from the CVS archive
69to avoid noisy changesets. Highly recommended, but off by default
70to preserve compatibility with early imported trees.
71
72-u::
73Convert underscores in tag and branch names to dots.
74
75-s <subst>::
76Substitute the character "/" in branch names with <subst>
77
Junio C Hamano1a4e8412005-12-27 08:17:2378-p <options-for-cvsps>::
79Additional options for cvsps.
80The options '-u' and '-A' are implicit and should not be used here.
81+
82If you need to pass multiple options, separate them with a comma.
83
Junio C Hamano12a3a232007-04-07 10:18:1084-z <fuzz>::
85Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
86cvsps defaults to 300s.
87
Junio C Hamano1a4e8412005-12-27 08:17:2388-P <cvsps-output-file>::
89Instead of calling cvsps, read the provided cvsps output file. Useful
90for debugging or when cvsps is being handled outside cvsimport.
91
92-m::
93Attempt to detect merges based on the commit message. This option
94will enable default regexes that try to capture the name source
95branch name from the commit message.
96
97-M <regex>::
98Attempt to detect merges based on the commit message with a custom
Junio C Hamano12a3a232007-04-07 10:18:1099regex. It can be used with '-m' to also see the default regexes.
Junio C Hamano1a4e8412005-12-27 08:17:23100You must escape forward slashes.
101
Junio C Hamano12a3a232007-04-07 10:18:10102-S <regex>::
103Skip paths matching the regex.
Junio C Hamano1a4e8412005-12-27 08:17:23104
Junio C Hamanod1204f02007-01-08 11:18:48105-a::
106Import all commits, including recent ones. cvsimport by default
107skips commits that have a timestamp less than 10 minutes ago.
108
Junio C Hamanod1204f02007-01-08 11:18:48109-L <limit>::
110Limit the number of commits imported. Workaround for cases where
111cvsimport leaks memory.
112
Junio C Hamanodb911ee2007-02-28 08:13:52113-A <author-conv-file>::
114CVS by default uses the Unix username when writing its
115commit logs. Using this option and an author-conv-file
116in this format
Junio C Hamanoa725a532006-03-21 08:33:47117+
118---------
Junio C Hamano02d6fa52006-01-16 08:23:23119exon=Andreas Ericsson <ae@op5.se>
120spawn=Simon Pawn <spawn@frog-pond.org>
121
Junio C Hamanoa725a532006-03-21 08:33:47122---------
123+
124git-cvsimport will make it appear as those authors had
125their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
126all along.
127+
Junio C Hamano12a3a232007-04-07 10:18:10128For convenience, this data is saved to `$GIT_DIR/cvs-authors`
129each time the '-A' option is provided and read from that same
Junio C Hamanoa725a532006-03-21 08:33:47130file each time git-cvsimport is run.
131+
132It is not recommended to use this feature if you intend to
133export changes back to CVS again later with
Junio C Hamanod7e63042006-08-02 21:12:23134gitlink:git-cvsexportcommit[1].
Junio C Hamano02d6fa52006-01-16 08:23:23135
Junio C Hamano12a3a232007-04-07 10:18:10136-h::
137Print a short usage message and exit.
138
Junio C Hamano1a4e8412005-12-27 08:17:23139OUTPUT
140------
141If '-v' is specified, the script reports what it is doing.
142
143Otherwise, success is indicated the Unix way, i.e. by simply exiting with
144a zero exit status.
145
146
147Author
148------
149Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
150various participants of the git-list <git@vger.kernel.org>.
151
152Documentation
153--------------
154Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
155
156GIT
157---
158Part of the gitlink:git[7] suite
159