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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
============
CVSPS Import
============
``cvsps-import`` is a plugin for brz, which is able to convert a cvs repository
into a brz repository, preserving the project history.
You can find the Launchpad_ project (including the bug tracker) at
https://launchpad.net/brz-cvsps-import
.. _Launchpad: http://launchpad.net
Comparison with other converters
================================
Tailor_
-------
Tailor_ is a program which is designed to convert between many different
formats, while ``cvsps-import`` is only able to convert from a cvs project into
a brz project. By focusing on just those two formats it is able to achieve a
much faster conversion rate, and is also able to convert all branches of a cvs
project.
.. _Tailor: http://www.darcs.net/DarcsWiki/Tailor
Example Usage
=============
There are a few ways to use ``cvsps-import`` depending on the complexity of
the project.
Normal Usage
------------
Most project can be simply imported with::
brz cvsps-import path/to/cvsroot module output
Obviously this has 3 portions
``path/to/cvsroot``
This can be a relative or absolute path, but at the moment must be a local
path. (``:pserver:`` and ``:ext:`` are not yet supported).
Underneath this directory should be the cvs control files. Most notably
``CVSROOT`` which is how cvs tells that it is a repository.
You should be able to ``cvs -d /absolute/path/to/cvsroot rlog module``.
``module``
The cvs module to converted. This can be "." to convert the entire
repository.
It can be any path inside the repository (ie it can be a sub-module with
"``path/to/module``").
``output``
An output directory to store the conversion, and any intermediate
information.
You can verify the output by then checking out the local copy with brz::
mkdir /tmp/foo; cd /tmp/foo
brz co ``output``/brz/branches/HEAD
If that looks good, you can then push to a branch in Launchpad::
cd ``output``/brz/branches/HEAD
brz push lp:~/your/project/import
When things get tricky
----------------------
Usually ``brz cvsps-import`` runs ``cvsps`` itself with appropriate flags to
generate the changeset file. ``cvsps`` has some limited support for extracting
the log of all revisions. However, sometimes that is insufficient and you need
to generate a dump file manually. To do so, create a cvs checkout of the base
module (you can checkout just the top-level directory with ``-l``). And then
run ``cvsps`` from there to generate the dump file.
For example::
cvs -d /path/to/cvsroot co -l module
cd module
cvsps -A -q -u > ../module.dump
cd ..
brz cvsps-import --cvsps-dump module.dump /path/to/cvsroot module out
Options
=======
There are a few options which can be used to change how the conversion will be
done.
``--use-rcs``
When extracting texts from the control files, use the rcs command "``co``".
This is slightly faster than ``--use-cvs``.
``--use-cvs``
Use ``cvs co -p`` to extract the texts from the control files. This is
useful when you don't have the rcs tools installed. It seems to be slightly
slower than ``--use-rcs``.
``--encoding=ENCODING``
Set the encoding to use when reading author names and commit logs. The
default encoding is ``iso-8859-1`` (``latin-1``).
BUGS
====
The bug tracker for ``cvsps-import`` is hosted on launchpad at
https://launchpad.net/brz-cvsps-import/+bugs
..
vim: tw=78 spell ft=rst
|