]>
Commit | Line | Data |
---|---|---|
215a7ad1 JH |
1 | git-cvsimport(1) |
2 | ================ | |
f2114060 MU |
3 | |
4 | NAME | |
5 | ---- | |
c3f0baac | 6 | git-cvsimport - Salvage your data out of another SCM people love to hate |
f2114060 MU |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
353ce815 JF |
11 | [verse] |
12 | 'git-cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>] [-s <subst>] | |
13 | [-p <options-for-cvsps>] [-C <git_repository>] [-i] [-P <file>] | |
14 | [-m] [-M regex] [<CVS_module>] | |
f2114060 MU |
15 | |
16 | ||
17 | DESCRIPTION | |
18 | ----------- | |
19 | Imports a CVS repository into git. It will either create a new | |
20 | repository, or incrementally import into an existing one. | |
21 | ||
1cd3674a | 22 | Splitting the CVS log into patch sets is done by 'cvsps'. |
f2114060 MU |
23 | At least version 2.1 is required. |
24 | ||
a541211e MU |
25 | You should *never* do any work of your own on the branches that are |
26 | created by git-cvsimport. The initial import will create and populate a | |
27 | "master" branch from the CVS repository's main branch which you're free | |
28 | to work with; after that, you need to 'git merge' incremental imports, or | |
29 | any CVS branches, yourself. | |
30 | ||
f2114060 MU |
31 | OPTIONS |
32 | ------- | |
33 | -d <CVSROOT>:: | |
34 | The root of the CVS archive. May be local (a simple path) or remote; | |
34155390 SV |
35 | currently, only the :local:, :ext: and :pserver: access methods |
36 | are supported. | |
f2114060 | 37 | |
b0921331 | 38 | -C <target-dir>:: |
72e9340c | 39 | The git repository to import to. If the directory doesn't |
b0921331 DK |
40 | exist, it will be created. Default is the current directory. |
41 | ||
c1c774e7 SV |
42 | -i:: |
43 | Import-only: don't perform a checkout after importing. This option | |
5f3aa197 | 44 | ensures the working directory and index remain untouched and will |
c1c774e7 SV |
45 | not create them if they do not exist. |
46 | ||
abe05822 ML |
47 | -k:: |
48 | Kill keywords: will extract files with -kk from the CVS archive | |
49 | to avoid noisy changesets. Highly recommended, but off by default | |
50 | to preserve compatibility with early imported trees. | |
51 | ||
0d821d4d PA |
52 | -u:: |
53 | Convert underscores in tag and branch names to dots. | |
54 | ||
f2114060 MU |
55 | -o <branch-for-HEAD>:: |
56 | The 'HEAD' branch from CVS is imported to the 'origin' branch within | |
57 | the git repository, as 'HEAD' already has a special meaning for git. | |
58 | Use this option if you want to import into a different branch. | |
df8baa42 JF |
59 | + |
60 | Use '-o master' for continuing an import that was initially done by | |
61 | the old cvs2git tool. | |
f2114060 MU |
62 | |
63 | -p <options-for-cvsps>:: | |
64 | Additional options for cvsps. | |
b0921331 | 65 | The options '-u' and '-A' are implicit and should not be used here. |
df8baa42 JF |
66 | + |
67 | If you need to pass multiple options, separate them with a comma. | |
f2114060 | 68 | |
56e5e917 | 69 | -P <cvsps-output-file>:: |
211dcac6 ML |
70 | Instead of calling cvsps, read the provided cvsps output file. Useful |
71 | for debugging or when cvsps is being handled outside cvsimport. | |
72 | ||
db4b6582 ML |
73 | -m:: |
74 | Attempt to detect merges based on the commit message. This option | |
75 | will enable default regexes that try to capture the name source | |
76 | branch name from the commit message. | |
77 | ||
78 | -M <regex>:: | |
79 | Attempt to detect merges based on the commit message with a custom | |
80 | regex. It can be used with -m to also see the default regexes. | |
81 | You must escape forward slashes. | |
82 | ||
f2114060 MU |
83 | -v:: |
84 | Verbosity: let 'cvsimport' report what it is doing. | |
85 | ||
86 | <CVS_module>:: | |
87 | The CVS module you want to import. Relative to <CVSROOT>. | |
88 | ||
f2114060 MU |
89 | -h:: |
90 | Print a short usage message and exit. | |
91 | ||
b0921331 | 92 | -z <fuzz>:: |
ded9f400 ML |
93 | Pass the timestamp fuzz factor to cvsps, in seconds. If unset, |
94 | cvsps defaults to 300s. | |
b0921331 | 95 | |
fbfd60d6 JS |
96 | -s <subst>:: |
97 | Substitute the character "/" in branch names with <subst> | |
98 | ||
ffd97f3a | 99 | -A <author-conv-file>:: |
23bfbb81 | 100 | CVS by default uses the Unix username when writing its |
ffd97f3a AE |
101 | commit logs. Using this option and an author-conv-file |
102 | in this format | |
ded9f400 ML |
103 | |
104 | -a:: | |
105 | Import all commits, including recent ones. cvsimport by default | |
106 | skips commits that have a timestamp less than 10 minutes ago. | |
eec84962 ML |
107 | |
108 | -S <regex>:: | |
109 | Skip paths matching the regex. | |
110 | ||
111 | -L <limit>:: | |
112 | Limit the number of commits imported. Workaround for cases where | |
113 | cvsimport leaks memory. | |
114 | ||
3070b603 FD |
115 | + |
116 | --------- | |
ffd97f3a AE |
117 | exon=Andreas Ericsson <ae@op5.se> |
118 | spawn=Simon Pawn <spawn@frog-pond.org> | |
119 | ||
3070b603 FD |
120 | --------- |
121 | + | |
122 | git-cvsimport will make it appear as those authors had | |
123 | their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly | |
124 | all along. | |
125 | + | |
126 | For convenience, this data is saved to $GIT_DIR/cvs-authors | |
127 | each time the -A option is provided and read from that same | |
128 | file each time git-cvsimport is run. | |
129 | + | |
130 | It is not recommended to use this feature if you intend to | |
131 | export changes back to CVS again later with | |
7fe08af4 | 132 | gitlink:git-cvsexportcommit[1]. |
ffd97f3a | 133 | |
f2114060 MU |
134 | OUTPUT |
135 | ------ | |
136 | If '-v' is specified, the script reports what it is doing. | |
137 | ||
138 | Otherwise, success is indicated the Unix way, i.e. by simply exiting with | |
139 | a zero exit status. | |
140 | ||
141 | ||
142 | Author | |
143 | ------ | |
144 | Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from | |
145 | various participants of the git-list <git@vger.kernel.org>. | |
146 | ||
147 | Documentation | |
148 | -------------- | |
149 | Documentation by Matthias Urlichs <smurf@smurf.noris.de>. | |
150 | ||
151 | GIT | |
152 | --- | |
a7154e91 | 153 | Part of the gitlink:git[7] suite |
f2114060 | 154 |