1GIT-CVSIMPORT(1)                  Git Manual                  GIT-CVSIMPORT(1)
2
3
4

NAME

6       git-cvsimport - Salvage your data out of another SCM people love to
7       hate
8

SYNOPSIS

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 <commit-limit>]
14                     [-r <remote>] [-R] [<CVS-module>]
15

DESCRIPTION

17       WARNING: git cvsimport uses cvsps version 2, which is considered
18       deprecated; it does not work with cvsps version 3 and later. If you are
19       performing a one-shot import of a CVS repository consider using
20       cvs2git[1] or cvs-fast-export[2].
21
22       Imports a CVS repository into Git. It will either create a new
23       repository, or incrementally import into an existing one.
24
25       Splitting the CVS log into patch sets is done by cvsps. At least
26       version 2.1 is required.
27
28       WARNING: for certain situations the import leads to incorrect results.
29       Please see the section ISSUES for further reference.
30
31       You should never do any work of your own on the branches that are
32       created by git cvsimport. By default initial import will create and
33       populate a "master" branch from the CVS repository’s main branch which
34       you’re free to work with; after that, you need to git merge incremental
35       imports, or any CVS branches, yourself. It is advisable to specify a
36       named remote via -r to separate and protect the incoming branches.
37
38       If you intend to set up a shared public repository that all developers
39       can read/write, or if you want to use git-cvsserver(1), then you
40       probably want to make a bare clone of the imported repository, and use
41       the clone as the shared repository. See gitcvs-migration(7).
42

OPTIONS

44       -v
45           Verbosity: let cvsimport report what it is doing.
46
47       -d <CVSROOT>
48           The root of the CVS archive. May be local (a simple path) or
49           remote; currently, only the :local:, :ext: and :pserver: access
50           methods are supported. If not given, git cvsimport will try to read
51           it from CVS/Root. If no such file exists, it checks for the CVSROOT
52           environment variable.
53
54       <CVS-module>
55           The CVS module you want to import. Relative to <CVSROOT>. If not
56           given, git cvsimport tries to read it from CVS/Repository.
57
58       -C <target-dir>
59           The Git repository to import to. If the directory doesn’t exist, it
60           will be created. Default is the current directory.
61
62       -r <remote>
63           The Git remote to import this CVS repository into. Moves all CVS
64           branches into remotes/<remote>/<branch> akin to the way git clone
65           uses origin by default.
66
67       -o <branch-for-HEAD>
68           When no remote is specified (via -r) the HEAD branch from CVS is
69           imported to the origin branch within the Git repository, as HEAD
70           already has a special meaning for Git. When a remote is specified
71           the HEAD branch is named remotes/<remote>/master mirroring git
72           clone behaviour. Use this option if you want to import into a
73           different branch.
74
75           Use -o master for continuing an import that was initially done by
76           the old cvs2git tool.
77
78       -i
79           Import-only: don’t perform a checkout after importing. This option
80           ensures the working directory and index remain untouched and will
81           not create them if they do not exist.
82
83       -k
84           Kill keywords: will extract files with -kk from the CVS archive to
85           avoid noisy changesets. Highly recommended, but off by default to
86           preserve compatibility with early imported trees.
87
88       -u
89           Convert underscores in tag and branch names to dots.
90
91       -s <subst>
92           Substitute the character "/" in branch names with <subst>
93
94       -p <options-for-cvsps>
95           Additional options for cvsps. The options -u and -A are implicit
96           and should not be used here.
97
98           If you need to pass multiple options, separate them with a comma.
99
100       -z <fuzz>
101           Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
102           cvsps defaults to 300s.
103
104       -P <cvsps-output-file>
105           Instead of calling cvsps, read the provided cvsps output file.
106           Useful for debugging or when cvsps is being handled outside
107           cvsimport.
108
109       -m
110           Attempt to detect merges based on the commit message. This option
111           will enable default regexes that try to capture the source branch
112           name from the commit message.
113
114       -M <regex>
115           Attempt to detect merges based on the commit message with a custom
116           regex. It can be used with -m to enable the default regexes as
117           well. You must escape forward slashes.
118
119           The regex must capture the source branch name in $1.
120
121           This option can be used several times to provide several detection
122           regexes.
123
124       -S <regex>
125           Skip paths matching the regex.
126
127       -a
128           Import all commits, including recent ones. cvsimport by default
129           skips commits that have a timestamp less than 10 minutes ago.
130
131       -L <limit>
132           Limit the number of commits imported. Workaround for cases where
133           cvsimport leaks memory.
134
135       -A <author-conv-file>
136           CVS by default uses the Unix username when writing its commit logs.
137           Using this option and an author-conv-file maps the name recorded in
138           CVS to author name, e-mail and optional time zone:
139
140                       exon=Andreas Ericsson <ae@op5.se>
141                       spawn=Simon Pawn <spawn@frog-pond.org> America/Chicago
142
143           git cvsimport will make it appear as those authors had their
144           GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly all along. If a
145           time zone is specified, GIT_AUTHOR_DATE will have the corresponding
146           offset applied.
147
148           For convenience, this data is saved to $GIT_DIR/cvs-authors each
149           time the -A option is provided and read from that same file each
150           time git cvsimport is run.
151
152           It is not recommended to use this feature if you intend to export
153           changes back to CVS again later with git cvsexportcommit.
154
155       -R
156           Generate a $GIT_DIR/cvs-revisions file containing a mapping from
157           CVS revision numbers to newly-created Git commit IDs. The generated
158           file will contain one line for each (filename, revision) pair
159           imported; each line will look like
160
161               src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7
162
163           The revision data is appended to the file if it already exists, for
164           use when doing incremental imports.
165
166           This option may be useful if you have CVS revision numbers stored
167           in commit messages, bug-tracking systems, email archives, and the
168           like.
169
170       -h
171           Print a short usage message and exit.
172

OUTPUT

174       If -v is specified, the script reports what it is doing.
175
176       Otherwise, success is indicated the Unix way, i.e. by simply exiting
177       with a zero exit status.
178

ISSUES

180       Problems related to timestamps:
181
182       •   If timestamps of commits in the CVS repository are not stable
183           enough to be used for ordering commits changes may show up in the
184           wrong order.
185
186       •   If any files were ever "cvs import"ed more than once (e.g., import
187           of more than one vendor release) the HEAD contains the wrong
188           content.
189
190       •   If the timestamp order of different files cross the revision order
191           within the commit matching time window the order of commits may be
192           wrong.
193
194       Problems related to branches:
195
196       •   Branches on which no commits have been made are not imported.
197
198       •   All files from the branching point are added to a branch even if
199           never added in CVS.
200
201       •   This applies to files added to the source branch after a daughter
202           branch was created: if previously no commit was made on the
203           daughter branch they will erroneously be added to the daughter
204           branch in git.
205
206       Problems related to tags:
207
208       •   Multiple tags on the same revision are not imported.
209
210       If you suspect that any of these issues may apply to the repository you
211       want to import, consider using cvs2git:
212
213       •   cvs2git (part of cvs2svn), http://subversion.apache.org/
214

GIT

216       Part of the git(1) suite
217

NOTES

219        1. cvs2git
220           http://cvs2svn.tigris.org/cvs2git.html
221
222        2. cvs-fast-export
223           http://www.catb.org/esr/cvs-fast-export/
224
225
226
227Git 2.39.1                        2023-01-13                  GIT-CVSIMPORT(1)
Impressum