1GIT-CVSIMPORT(1) Git Manual GIT-CVSIMPORT(1)
2
3
4
6 git-cvsimport - Salvage your data out of another SCM people love to
7 hate
8
10 git cvsimport [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>]
11 [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]
12 [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]
13 [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]
14 [-r <remote>] [-R] [<CVS_module>]
15
16
18 Imports a CVS repository into git. It will either create a new
19 repository, or incrementally import into an existing one.
20
21 Splitting the CVS log into patch sets is done by cvsps. At least
22 version 2.1 is required.
23
24 WARNING: for certain situations the import leads to incorrect results.
25 Please see the section ISSUES for further reference.
26
27 You should never do any work of your own on the branches that are
28 created by git cvsimport. By default initial import will create and
29 populate a "master" branch from the CVS repository’s main branch which
30 you’re free to work with; after that, you need to git merge incremental
31 imports, or any CVS branches, yourself. It is advisable to specify a
32 named remote via -r to separate and protect the incoming branches.
33
34 If you intend to set up a shared public repository that all developers
35 can read/write, or if you want to use git-cvsserver(1), then you
36 probably want to make a bare clone of the imported repository, and use
37 the clone as the shared repository. See gitcvs-migration(7).
38
40 -v
41 Verbosity: let cvsimport report what it is doing.
42
43 -d <CVSROOT>
44 The root of the CVS archive. May be local (a simple path) or
45 remote; currently, only the :local:, :ext: and :pserver: access
46 methods are supported. If not given, git cvsimport will try to read
47 it from CVS/Root. If no such file exists, it checks for the CVSROOT
48 environment variable.
49
50 <CVS_module>
51 The CVS module you want to import. Relative to <CVSROOT>. If not
52 given, git cvsimport tries to read it from CVS/Repository.
53
54 -C <target-dir>
55 The git repository to import to. If the directory doesn’t exist, it
56 will be created. Default is the current directory.
57
58 -r <remote>
59 The git remote to import this CVS repository into. Moves all CVS
60 branches into remotes/<remote>/<branch> akin to the way git clone
61 uses origin by default.
62
63 -o <branch-for-HEAD>
64 When no remote is specified (via -r) the HEAD branch from CVS is
65 imported to the origin branch within the git repository, as HEAD
66 already has a special meaning for git. When a remote is specified
67 the HEAD branch is named remotes/<remote>/master mirroring git
68 clone behaviour. Use this option if you want to import into a
69 different branch.
70
71 Use -o master for continuing an import that was initially done by
72 the old cvs2git tool.
73
74 -i
75 Import-only: don’t perform a checkout after importing. This option
76 ensures the working directory and index remain untouched and will
77 not create them if they do not exist.
78
79 -k
80 Kill keywords: will extract files with -kk from the CVS archive to
81 avoid noisy changesets. Highly recommended, but off by default to
82 preserve compatibility with early imported trees.
83
84 -u
85 Convert underscores in tag and branch names to dots.
86
87 -s <subst>
88 Substitute the character "/" in branch names with <subst>
89
90 -p <options-for-cvsps>
91 Additional options for cvsps. The options -u and -A are implicit
92 and should not be used here.
93
94 If you need to pass multiple options, separate them with a comma.
95
96 -z <fuzz>
97 Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
98 cvsps defaults to 300s.
99
100 -P <cvsps-output-file>
101 Instead of calling cvsps, read the provided cvsps output file.
102 Useful for debugging or when cvsps is being handled outside
103 cvsimport.
104
105 -m
106 Attempt to detect merges based on the commit message. This option
107 will enable default regexes that try to capture the source branch
108 name from the commit message.
109
110 -M <regex>
111 Attempt to detect merges based on the commit message with a custom
112 regex. It can be used with -m to enable the default regexes as
113 well. You must escape forward slashes.
114
115 The regex must capture the source branch name in $1.
116
117 This option can be used several times to provide several detection
118 regexes.
119
120 -S <regex>
121 Skip paths matching the regex.
122
123 -a
124 Import all commits, including recent ones. cvsimport by default
125 skips commits that have a timestamp less than 10 minutes ago.
126
127 -L <limit>
128 Limit the number of commits imported. Workaround for cases where
129 cvsimport leaks memory.
130
131 -A <author-conv-file>
132 CVS by default uses the Unix username when writing its commit logs.
133 Using this option and an author-conv-file in this format
134
135 exon=Andreas Ericsson <ae@op5.se>
136 spawn=Simon Pawn <spawn@frog-pond.org>
137
138 git cvsimport will make it appear as those authors had their
139 GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly all along.
140
141 For convenience, this data is saved to $GIT_DIR/cvs-authors each
142 time the -A option is provided and read from that same file each
143 time git cvsimport is run.
144
145 It is not recommended to use this feature if you intend to export
146 changes back to CVS again later with git cvsexportcommit.
147
148 -R
149 Generate a $GIT_DIR/cvs-revisions file containing a mapping from
150 CVS revision numbers to newly-created Git commit IDs. The generated
151 file will contain one line for each (filename, revision) pair
152 imported; each line will look like
153
154 src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7
155
156 The revision data is appended to the file if it already exists, for
157 use when doing incremental imports.
158
159 This option may be useful if you have CVS revision numbers stored
160 in commit messages, bug-tracking systems, email archives, and the
161 like.
162
163 -h
164 Print a short usage message and exit.
165
167 If -v is specified, the script reports what it is doing.
168
169 Otherwise, success is indicated the Unix way, i.e. by simply exiting
170 with a zero exit status.
171
173 Problems related to timestamps:
174
175 · If timestamps of commits in the cvs repository are not stable
176 enough to be used for ordering commits changes may show up in the
177 wrong order.
178
179 · If any files were ever "cvs import"ed more than once (e.g., import
180 of more than one vendor release) the HEAD contains the wrong
181 content.
182
183 · If the timestamp order of different files cross the revision order
184 within the commit matching time window the order of commits may be
185 wrong.
186
187 Problems related to branches:
188
189 · Branches on which no commits have been made are not imported.
190
191 · All files from the branching point are added to a branch even if
192 never added in cvs.
193
194 · This applies to files added to the source branch after a daughter
195 branch was created: if previously no commit was made on the
196 daughter branch they will erroneously be added to the daughter
197 branch in git.
198
199 Problems related to tags:
200
201 · Multiple tags on the same revision are not imported.
202
203 If you suspect that any of these issues may apply to the repository you
204 want to import consider using these alternative tools which proved to
205 be more stable in practice:
206
207 · cvs2git (part of cvs2svn), http://cvs2svn.tigris.org
208
209 · parsecvs, http://cgit.freedesktop.org/~keithp/parsecvs
210
212 Written by Matthias Urlichs <smurf@smurf.noris.de[1]>, with help from
213 various participants of the git-list <git@vger.kernel.org[2]>.
214
216 Documentation by Matthias Urlichs <smurf@smurf.noris.de[1]>.
217
219 Part of the git(1) suite
220
222 1. smurf@smurf.noris.de
223 mailto:smurf@smurf.noris.de
224
225 2. git@vger.kernel.org
226 mailto:git@vger.kernel.org
227
228
229
230Git 1.7.1 08/16/2017 GIT-CVSIMPORT(1)