hg-fast-import.py - mercurial to bzr converter using bzr fast-import Legal ===== Most hg-* scripts are licensed under the MIT license[0] and were written by Rocco Rutte with hints and help from the git list and #mercurial on freenode. hg-fast-export[1] was integrated into bzr-fastimport by Ian Clatworthy with permission from Rocco. The current maintainer is Frej Drejhammar . Usage ===== Using hg-fast-export is quite simple for a mercurial repository : bzr init-repo foo.bzr cd foo.bzr hg-fast-import.py -r | bzr fast-import - Notes/Limitations ================= hg-fast-import supports multiple branches but only named branches with exactly one head each. Otherwise commits to the tip of these heads within branch will get flattened into merge commits. The way the hg API and remote access protocol is designed it is not possible to use hg-fast-export on remote repositories (http/ssh). First clone the repository, then convert it. Design ====== hg-fast-import.py was designed in a way that doesn't require a 2-pass mechanism or any prior repository analysis: if just outputs what it finds. This also implies that it heavily relies on strictly linear ordering of changesets from hg, i.e. its append-only storage model so that changesets hg-fast-import already saw never get modified. Todo ==== Test incremental imports, particularly handling of branches and tags. For one-time conversions, everything should be fine. Footnotes ========= [0] http://www.opensource.org/licenses/mit-license.php [1] http://repo.or.cz/w/fast-export.git