Update Git docs to 2.29.2
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-cvsimport.xml
blob73fd657a559ca91547981dcd2955dafd3958ddd1
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">\r
3 \r
4 <sect2 lang="en" id="git-cvsimport(1)">\r
5     <title>git-cvsimport(1)</title>\r
6 <indexterm>\r
7 <primary>git-cvsimport(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-cvsimport(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-cvsimport - Salvage your data out of another SCM people love to hate</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-cvsimport(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git cvsimport</emphasis> [-o &lt;branch-for-HEAD&gt;] [-h] [-v] [-d &lt;CVSROOT&gt;]\r
17               [-A &lt;author-conv-file&gt;] [-p &lt;options-for-cvsps&gt;] [-P &lt;file&gt;]\r
18               [-C &lt;git_repository&gt;] [-z &lt;fuzz&gt;] [-i] [-k] [-u] [-s &lt;subst&gt;]\r
19               [-a] [-m] [-M &lt;regex&gt;] [-S &lt;regex&gt;] [-L &lt;commitlimit&gt;]\r
20               [-r &lt;remote&gt;] [-R] [&lt;CVS_module&gt;]</literallayout>\r
21 </blockquote>\r
22 </simplesect>\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
47 </simplesect>\r
48 <simplesect id="git-cvsimport(1)__options">\r
49 <title>OPTIONS</title>\r
50 <variablelist>\r
51 <varlistentry>\r
52 <term>\r
53 -v\r
54 </term>\r
55 <listitem>\r
56 <simpara>\r
57         Verbosity: let <emphasis>cvsimport</emphasis> report what it is doing.\r
58 </simpara>\r
59 </listitem>\r
60 </varlistentry>\r
61 <varlistentry>\r
62 <term>\r
63 -d &lt;CVSROOT&gt;\r
64 </term>\r
65 <listitem>\r
66 <simpara>\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
72 </simpara>\r
73 </listitem>\r
74 </varlistentry>\r
75 <varlistentry>\r
76 <term>\r
77 &lt;CVS_module&gt;\r
78 </term>\r
79 <listitem>\r
80 <simpara>\r
81         The CVS module you want to import. Relative to &lt;CVSROOT&gt;.\r
82         If not given, <emphasis>git cvsimport</emphasis> tries to read it from\r
83         <emphasis>CVS/Repository</emphasis>.\r
84 </simpara>\r
85 </listitem>\r
86 </varlistentry>\r
87 <varlistentry>\r
88 <term>\r
89 -C &lt;target-dir&gt;\r
90 </term>\r
91 <listitem>\r
92 <simpara>\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
95 </simpara>\r
96 </listitem>\r
97 </varlistentry>\r
98 <varlistentry>\r
99 <term>\r
100 -r &lt;remote&gt;\r
101 </term>\r
102 <listitem>\r
103 <simpara>\r
104         The Git remote to import this CVS repository into.\r
105         Moves all CVS branches into remotes/&lt;remote&gt;/&lt;branch&gt;\r
106         akin to the way <emphasis>git clone</emphasis> uses <emphasis>origin</emphasis> by default.\r
107 </simpara>\r
108 </listitem>\r
109 </varlistentry>\r
110 <varlistentry>\r
111 <term>\r
112 -o &lt;branch-for-HEAD&gt;\r
113 </term>\r
114 <listitem>\r
115 <simpara>\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/&lt;remote&gt;/master mirroring <emphasis>git clone</emphasis> behaviour.\r
121         Use this option if you want to import into a different\r
122         branch.\r
123 </simpara>\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
126 </listitem>\r
127 </varlistentry>\r
128 <varlistentry>\r
129 <term>\r
130 -i\r
131 </term>\r
132 <listitem>\r
133 <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
137 </simpara>\r
138 </listitem>\r
139 </varlistentry>\r
140 <varlistentry>\r
141 <term>\r
142 -k\r
143 </term>\r
144 <listitem>\r
145 <simpara>\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
149 </simpara>\r
150 </listitem>\r
151 </varlistentry>\r
152 <varlistentry>\r
153 <term>\r
154 -u\r
155 </term>\r
156 <listitem>\r
157 <simpara>\r
158         Convert underscores in tag and branch names to dots.\r
159 </simpara>\r
160 </listitem>\r
161 </varlistentry>\r
162 <varlistentry>\r
163 <term>\r
164 -s &lt;subst&gt;\r
165 </term>\r
166 <listitem>\r
167 <simpara>\r
168         Substitute the character "/" in branch names with &lt;subst&gt;\r
169 </simpara>\r
170 </listitem>\r
171 </varlistentry>\r
172 <varlistentry>\r
173 <term>\r
174 -p &lt;options-for-cvsps&gt;\r
175 </term>\r
176 <listitem>\r
177 <simpara>\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
180 </simpara>\r
181 <simpara>If you need to pass multiple options, separate them with a comma.</simpara>\r
182 </listitem>\r
183 </varlistentry>\r
184 <varlistentry>\r
185 <term>\r
186 -z &lt;fuzz&gt;\r
187 </term>\r
188 <listitem>\r
189 <simpara>\r
190         Pass the timestamp fuzz factor to cvsps, in seconds. If unset,\r
191         cvsps defaults to 300s.\r
192 </simpara>\r
193 </listitem>\r
194 </varlistentry>\r
195 <varlistentry>\r
196 <term>\r
197 -P &lt;cvsps-output-file&gt;\r
198 </term>\r
199 <listitem>\r
200 <simpara>\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
203 </simpara>\r
204 </listitem>\r
205 </varlistentry>\r
206 <varlistentry>\r
207 <term>\r
208 -m\r
209 </term>\r
210 <listitem>\r
211 <simpara>\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
215 </simpara>\r
216 </listitem>\r
217 </varlistentry>\r
218 <varlistentry>\r
219 <term>\r
220 -M &lt;regex&gt;\r
221 </term>\r
222 <listitem>\r
223 <simpara>\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
227 </simpara>\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
230 </listitem>\r
231 </varlistentry>\r
232 <varlistentry>\r
233 <term>\r
234 -S &lt;regex&gt;\r
235 </term>\r
236 <listitem>\r
237 <simpara>\r
238         Skip paths matching the regex.\r
239 </simpara>\r
240 </listitem>\r
241 </varlistentry>\r
242 <varlistentry>\r
243 <term>\r
244 -a\r
245 </term>\r
246 <listitem>\r
247 <simpara>\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
250 </simpara>\r
251 </listitem>\r
252 </varlistentry>\r
253 <varlistentry>\r
254 <term>\r
255 -L &lt;limit&gt;\r
256 </term>\r
257 <listitem>\r
258 <simpara>\r
259         Limit the number of commits imported. Workaround for cases where\r
260         cvsimport leaks memory.\r
261 </simpara>\r
262 </listitem>\r
263 </varlistentry>\r
264 <varlistentry>\r
265 <term>\r
266 -A &lt;author-conv-file&gt;\r
267 </term>\r
268 <listitem>\r
269 <simpara>\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
274 </simpara>\r
275 <screen>        exon=Andreas Ericsson &lt;ae@op5.se&gt;\r
276         spawn=Simon Pawn &lt;spawn@frog-pond.org&gt; 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
287 </listitem>\r
288 </varlistentry>\r
289 <varlistentry>\r
290 <term>\r
291 -R\r
292 </term>\r
293 <listitem>\r
294 <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
299 </simpara>\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
305 </listitem>\r
306 </varlistentry>\r
307 <varlistentry>\r
308 <term>\r
309 -h\r
310 </term>\r
311 <listitem>\r
312 <simpara>\r
313         Print a short usage message and exit.\r
314 </simpara>\r
315 </listitem>\r
316 </varlistentry>\r
317 </variablelist>\r
318 </simplesect>\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
324 </simplesect>\r
325 <simplesect id="git-cvsimport(1)_issues">\r
326 <title>ISSUES</title>\r
327 <simpara>Problems related to timestamps:</simpara>\r
328 <itemizedlist>\r
329 <listitem>\r
330 <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
333    order.\r
334 </simpara>\r
335 </listitem>\r
336 <listitem>\r
337 <simpara>\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
340 </simpara>\r
341 </listitem>\r
342 <listitem>\r
343 <simpara>\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
346    wrong.\r
347 </simpara>\r
348 </listitem>\r
349 </itemizedlist>\r
350 <simpara>Problems related to branches:</simpara>\r
351 <itemizedlist>\r
352 <listitem>\r
353 <simpara>\r
354 Branches on which no commits have been made are not imported.\r
355 </simpara>\r
356 </listitem>\r
357 <listitem>\r
358 <simpara>\r
359 All files from the branching point are added to a branch even if\r
360    never added in CVS.\r
361 </simpara>\r
362 </listitem>\r
363 <listitem>\r
364 <simpara>\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
368 </simpara>\r
369 </listitem>\r
370 </itemizedlist>\r
371 <simpara>Problems related to tags:</simpara>\r
372 <itemizedlist>\r
373 <listitem>\r
374 <simpara>\r
375 Multiple tags on the same revision are not imported.\r
376 </simpara>\r
377 </listitem>\r
378 </itemizedlist>\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
381 <itemizedlist>\r
382 <listitem>\r
383 <simpara>\r
384 cvs2git (part of cvs2svn), <emphasis>http://subversion.apache.org/</emphasis>\r
385 </simpara>\r
386 </listitem>\r
387 </itemizedlist>\r
388 </simplesect>\r
389 <simplesect id="git-cvsimport(1)__git">\r
390 <title>GIT</title>\r
391 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
392 </simplesect>\r
393 </sect2>\r