Converting Repositories

Your first option should probably be the ConvertExtension bundled with Mercurial. It supports branches, incremental imports, and a few other nice features, and is maintained by the Mercurial authors. It currently only understands CVS, Subversion, Git, Darcs, Monotone, Bazaar, GNU Arch, Perforce and Mercurial as source formats and Mercurial and Subversion as destination formats.

Otherwise, the following tools may be useful.

1. Arch / TLA / Baz 1.5

2. Bazaar?

3. ClearCase

4. RCS

Convert to CVS (see ConvertExtension) and then use CVS tools.

5. CVS

Multiple convertors exist for converting from CVS to Mercurial:

Note: If ConvertExtension fails to import your repository, try using cvs2svn to convert first to Subversion, and then import from Subversion. The cvs2svn converter correctly handles a number of cases that the direct cvsps-based converter gets confused on. Alternatively cvs2svn can also export to git-fast-import format which FastImportExtension can process.

You can also convert from Mercurial to CVS:

6. Darcs

7. Git

See GitConversion (incremental).

8. Subversion

The ConvertExtension included in Mercurial 0.9.5 can import Subversion trees. It uses the Subversion API, so it can speak any Subversion repository access protocol.

Examples and details about Subversion interoperability can be found in WorkingWithSubversion.

Converters that work on local repositories or data (faster, if this is an option for you):

Converters that work on remote repositories:

Syncing tools:

9. Perforce

The ConvertExtension supports conversion from Perforce since version 1.2.

There is also a stand-alone script p4_to_hg This utility can actually keep two repositories in sync.

Currently, it's slapped together and built to serve my particular needs, but it could probably be modified into something more general. It currently makes no attempt to do anything with Perforce's ability to track branches or the movement of changesets from branch to branch. -- EricHopper 2005-09-27 06:31:03

See also posting http://selenic.com/pipermail/mercurial/2008-July/020241.html: "Start of Mercurial git-fast-import importer (was p4 to hg)" by Paul Crowley

10. Bitkeeper

Because of the threatening behavior of Larry McVoldemort of Bitmover, no Bitkeeper conversion tools have been made publically available. See GenericConversion for details on building your own repository conversion tool.

11. TeamWare

Very experimental conversion script available if you can find nothing better:

http://blogs.sun.com/jglick/entry/teamware_to_mercurial_history_conversions

12. Visual SourceSafe

13. Monotone

14. Other systems

Tailor is a conversion tool that can do simple conversions from a variety of systems. See GenericConversion for details on building your own repository conversion tool.


CategoryConversion