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