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