...
 
Commits (5)
......@@ -4,13 +4,13 @@
Package: reposurgeon
Description: A tool for editing version-control repository history.
reposurgeon enables risky operations that version-control systems
don't want to let you do, such as editing past comments and metadata
and removing commits. It works with any version control system that
can export and import git fast-import streams, including git, hg,
fossil, bzr, CVS, RCS, and src. It can also read Subversion dump
files directly and can thus be used to script production of very
high-quality conversions from Subversion to any supported DVCS.
reposurgeon enables risky operations that version-control systems don't want
to let you do, such as editing past comments and metadata and removing
commits. It works with any version control system that can export and
import git fast-import streams, including git, hg, fossil, bzr, CVS,
RCS, src, and BitKeeper. It can also read Subversion dump files directly
and can thus be used to script production of very high-quality
conversions from Subversion to any supported DVCS.
Homepage: http://www.catb.org/~esr/reposurgeon
......
......@@ -4,9 +4,9 @@
# 0. Copy this into a scratch directory as Makefile.
# 1. Make sure reposurgeon, repostreamer, and repopuller are on your $PATH.
# 2. Set PROJECT to the name of your project.
# 3. Set SOURCE_VCS to svn or cvs.
# 3. Set SOURCE_VCS to svn, cvs, or bk.
# 4. Set TARGET_VCS to git, hg, or bzr.
# 5. For svn, set REMOTE_URL to point at the remote repository
# 5. For svn or bk, set REMOTE_URL to point at the remote repository
# you want to convert.
# 6. For cvs, set CVS_HOST to the repo hostname and CVS_MODULE to the module,
# then uncomment the line that builds REMOTE_URL
......@@ -27,7 +27,7 @@
# name extra metadata such as a comments mailbox.
#
# After the conversion, you may be able to perform a sanity check with
# 'make diff' (supported for CVS and svn). You can check
# 'make diff' (supported for CVS and svn, not for bk). You can check
# individual tags or branches with 'make diff-tag'
#
# Note that CVS-checkout directories not matched in a conversion may be
......
......@@ -80,7 +80,8 @@ entire conversion sequence will look like.
== Step One: The Author Map ==
Subversion and CVS identify users by a Unix login name local to the
repository host; DVCSes use pairs of fullnames and email addresses.
repository host; BitKeeper uses a full email address;
DVCSes use pairs of fullnames and email addresses.
Before you can finish your conversion, you'll need to put together an
author map that maps the former to the latter; the Makefile assumes
this is named $(PROJECT).map. The author map should specify a full
......@@ -146,6 +147,8 @@ opinion of them can be gauged by the fact that I wrote my own:
reposurgeon. You can read a
http://www.catb.org/~esr/reposurgeon/features.html[description] of the
things it does that other conversion tools don't.)
I also maintain reposurgeon front ends for lifting CVS repostories
(cvs-fast-export) and BitKeeper repositories (SourcePuller).
So, install reposurgeon and whatever tool it needs to read your
repository. That will be
......@@ -256,6 +259,9 @@ Fossil: reposurgeon will read a Fossil repository file. It uses the
native Fossil exporter, which is pretty good but doesn't export ignore
patterns, wiki events, or tickets.
BitKeeper: reposurgeon will read a BitKeeper repository. It uses
http://www.catb.org/~esr/sourcepuller[SourcePuller].
For other systems, see the
https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools#Interaction_with_other_Revision_Control_Systems[Git
wiki page on conversion tools].
......
......@@ -540,6 +540,22 @@ def __str__(self):
cookies=(VCS.nobug + VCS.bare_numeric,),
project=b"http://catb.org/~esr/src",
notes=b""),
VCS(name=b"bk",
subdirectory=b"BitKeeper",
exporter=b"sourcepuller --reposurgeon fast-export",
styleflags={},
properties=False,
initializer=None,
importer=None,
checkout=None,
lister=None,
preserve=set(),
authormap=None,
ignorename=b".gitignore",
dfltignores=b"", # Has none (except for PENDING).
cookies=(VCS.bare_numeric,),
project=b"http://catb.org/~esr/sourcepuller",
notes=b"Only BitKeeper versions up to 5 are supported."),
]
# Import and export filter methods for VCSes that use magic files rather
......
......@@ -69,7 +69,9 @@ command and written out with the <option>--format=fossil</option> option of
the <command>write</command>. Ignore patterns are not translated
in either direction.</para>
<para>CVS is supported for read only, not write. For CVS,
<para>CVS and BitKeeper are supported for read only, not write, and
the exporter <command>reposurgeon</command> uses will fail on
BitKeeper versions 6 and later. For both,
<command>reposurgeon</command> must be run from within a repository
directory.</para>
......@@ -183,7 +185,7 @@ edit ;; edit all editable objects
;; of a branch named 2317, or a commit with legacy ID
;; 2317. Inspect what is found. A plain number is
;; probably a legacy ID inherited from a Subversion
;; revision number.
;; or BitKeeper revision number.
/regression/ list ;; list all commits and tags with comments or
;; committer headers or author headers containing
......@@ -236,11 +238,12 @@ distinguish them from command keywords.</para>
<varlistentry>
<term><firstterm>legacy IDs</firstterm></term>
<listitem>
<para>If the contents of name brackets (&lt; &gt;) does not match a tag or
branch name, the interpreter next searches legacy IDs of commits. This
is especially useful when you have imported a Subversion dump; it
means that commits made from it can be referred to by their corresponding
Subversion revision numbers.</para>
<para>If the contents of name brackets (&lt; &gt;) does not match a
tag or branch name, the interpreter next searches legacy IDs of
commits. This is especially useful when you have imported a
Subversion dump or a BitKeeper repository; it means that commits made
from it can be referred to by their corresponding Subversion or
BitKeeper revision numbers.</para>
</listitem>
</varlistentry>
<varlistentry>
......@@ -2080,12 +2083,14 @@ associated with repository conversions from order systems.</para>
set, defaulting to all events.</para>
<para>Lifts from CVS and Subversion may have only usernames local to
the repository host in committer and author IDs. DVCSes want email
addresses (net-wide identifiers) and complete names. To supply the map
from one to the other, an authors file is expected to consist of
lines each beginning with a local user ID, followed by a '=' (possibly
surrounded by whitespace) followed by a full name and email address,
optionally followed by a timezone offset field. Thus:</para>
the repository host in committer and author IDs; BitKeeper uses full
email names as IDs but does not include a name-among-humans
part. DVCSes want email addresses (net-wide identifiers) and complete
names. To supply the map from one to the other, an authors file is
expected to consist of lines each beginning with a local user ID,
followed by a '=' (possibly surrounded by whitespace) followed by a
full name and email address, optionally followed by a timezone offset
field. Thus:</para>
<literallayout>
ferd = Ferd J. Foonly &lt;foonly@foo.com&gt; -0500
......@@ -2919,7 +2924,9 @@ compatibility table describes which patterns will translate;
glob or regexp syntax or negation.</para>
<para>RCS has no ignore files or patterns and is therefore not
included in the table.</para>
included in the table. BitKeeper ignore specifications are moved
to a root .gitignore, but as their globbing rules are not publicly
documented we cannot guarantee identical behavior.</para>
<informaltable pgwide='0' frame='all'>
<tgroup cols='3' align='center'>
......@@ -3321,6 +3328,14 @@ is due to inherent problems with CVS's file-oriented model.</para>
handles RCS collections as well). The caveat for CVS applies.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>BitKeeper</term>
<listitem>
<para>Requires SourcePuller at version 0.3 or later. Note:
SourcePuller has only been tested on BitKeeper version 5; it
will fail on versions 6 and later.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
......
......@@ -16,6 +16,9 @@ export)
if [ -d locks ]
then
svnadmin dump .
elif [ -f SCCS/s.ChangeSet ]
then
sourcepuller --reposurgeon fast-export .
elif [ -d .git ]
then
git fast-export --all
......@@ -69,6 +72,14 @@ EOF
elif [ -f $operand/.cvssync ]
then
cvssync -o $operand `cat $operand/.cvssync`
elif [ `expr "$operand" : "bk://"` = 5 ]
then
local=`basename $operand`-mirror
sourcepuller clone $operand $local
echo "$operand" >$local/.spsync
elif [ -f $operand/.spsync ]
then
sourcepuller pull `cat $operand/.spsync` $operand
else
echo "repotool: $operand does not look like a repository mirror."
exit 1
......@@ -86,6 +97,9 @@ tags)
elif [ -d locks ]
then
svn ls "^/tags"
elif [ -f SCCS/s.ChangeSet ]
then
sourcepuller tags | sed -n "/^\t/s/\t//p"
elif [ -d .git ]
then
git tag -l
......@@ -134,6 +148,13 @@ checkout)
rev="-d $rev"
fi
svn co $rev file://${PWD} $outdir
elif [ -f SCCS/s.ChangeSet ]
then
if [ "$rev" ]
then
rev="-R $rev"
fi
sourcepuller checkout $rev . $outdir
elif [ -d .git ]
then
git clone --quiet --shared --no-checkout . $outdir
......
......@@ -13,7 +13,7 @@
</refmeta>
<refnamediv id='name'>
<refname>repotool</refname>
<refpurpose>query a CVS, Subversion, git, bzr, hg, or
<refpurpose>query a CVS, Subversion, BitKeeper, git, bzr, hg, or
darcs repository in a uniform way</refpurpose>
</refnamediv>
<refsynopsisdiv id='synopsis'>
......@@ -38,7 +38,7 @@ action.</para>
<para>The 'export' action, run from within a repository directory
(within a module directory for CVS), dumps a copy of a CVS,
Subversion, git, bzr, hg, or darcs repository to a flat
Subversion, BitKeeper, git, bzr, hg, or darcs repository to a flat
history file readable by reposurgeon.</para>
<para>The 'tags' option, run from within a repository directory
......@@ -68,8 +68,8 @@ followed by basenames of paths to exclude from comparison. You can get
a context-diff report on file digfferences with the -u option.</para>
<para>The 'mirror' action makes or updates a local mirror of a
Subversion or CVS repo. It requires a single argument,
either a Subversion URL or a CVS URL, or the name
Subversion, CVS, or BitKeeper repo. It requires a single argument,
either a Subversion URL or a CVS URL or a BitKeeper URL, or the name
of a local mirror directory created by a previous run. The first form
creates a local mirror of the repository in a directory named after
the last segment of the URL, with the suffix
......@@ -78,7 +78,7 @@ optional) second argument. The second form updates the local mirror,
doing an incremental fetch; just give the mirror directory
name.</para>
<para>Subversion URLs are as specified in the public
<para>Subversion and BitKeeper URLs are as specified in the public
documentation for those systems. CVS URLs must specify a host and
repository path, followed by a '#', followed by a module name.</para>
</refsect1>
......@@ -93,7 +93,9 @@ following engines:
<citerefentry><refentrytitle>svnadmin</refentrytitle><manvolnum>1</manvolnum></citerefentry>
(for SVN),
<citerefentry><refentrytitle>hg-fast-export.py</refentrytitle><manvolnum>1</manvolnum></citerefentry>
(for hg).
(for hg),
<citerefentry><refentrytitle>sp</refentrytitle><manvolnum>1</manvolnum></citerefentry>
(for BitKeeper).
You must have the appropriate engine in your $PATH
for whatever kind of repository you are streaming.
</para>
......