-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcvs2gitdump.1
81 lines (81 loc) · 2.5 KB
/
cvs2gitdump.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.Dd August 1, 2016
.Dt CVS2GITDUMP 1
.Os
.Sh NAME
.Nm cvs2gitdump
.Nd imports a cvs tree into a git repository
.Sh SYNOPSIS
.Nm
.Op Fl ah
.Op Fl z Ar fuzz
.Op Fl e Ar email_domain
.Op Fl E Ar log_encodings
.Op Fl k Ar rcs_keywords
.Op Fl b Ar branch
.Op Fl m Ar module
.Op Fl l Ar last_revision
.Ar cvsroot
.Op Ar git_dir
.Sh DESCRIPTION
.Nm
is a small python script which imports a cvs tree into a git repository.
.Nm
has a small footprint, supports incremental imports and converts tags to HEAD.
It's very fast because the conversion is done in memory.
.Pp
Options:
.Bl -tag -width Ds
.It Fl a
By default, the script will only use commits 10 minutes older than the most
recent commit because recent commits are not stable if the repository is
changing. This option will change this behavior. It will use all the commits.
.It Fl b Ar branch
The git branch which is used for incremental import.
.It Fl h
Show the usage.
.It Fl z Ar fuzz
When the script collects changesets from the CVS repository, commits by the
same author, using the same log message and within fuzz seconds are collected
into the same changeset. 300 (seconds) is used as default.
.It Fl e Ar email_domain
Append the email domain to the author field.
.It Fl E Ar log_encodings
Specify the character encodings used for decoding CVS logs. Multiple encodings
can be specified by separating with ','. Specified encodings are used in order
for decoding the log. Default is 'utf-8,iso-8859-1'
.It Fl k Ar rcs_keywords
Add an extra RCS keyword which are used by CVS. The script substitutes the RCS
keyword by the same way as $Id$.
.It Fl m Ar module
Specify the target module name in the target cvsroot. The script will dump only
the directory specified by this option.
.It Fl l Ar last_revision
Specify the last SHA-1 revision which is used for finding the last change set
in the CVS tree.
.It Ar cvsroot
The target cvsroot or the sub directory of the cvsroot. The script treats this
directory as the root directory.
.It Ar git_dir
The git repository. Specify this for incremental import.
.El
.Sh EXAMPLES
First import:
.Bd -literal
$ git init --bare /git/openbsd.git
$ cvs2gitdump -k OpenBSD -e openbsd.org \(rs
/cvs/openbsd/src > openbsd.dump
$ git --git-dir /git/openbsd.git fast-import < openbsd.dump
.Ed
.Pp
Periodic import:
.Bd -literal
$ cvsync
$ cvs2gitdump -k OpenBSD -e openbsd.org /cvs/openbsd/src \(rs
/git/openbsd.git > openbsd2.dump
$ git --git-dir /git/openbsd.git fast-import < openbsd2.dump
.Ed
.Sh AUTHORS
.An YASUOKA Masahiko.
.Sh CAVEATS
.Nm
doesn't convert branches.