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