summaryrefslogtreecommitdiff
path: root/exporters/hg-fast-export.README
blob: a5999de4376a984952b7520ec2b50528a1845e34 (plain)
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
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 <pdmef@gmx.net> 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 <frej.drejhammar@gmail.com>.

Usage
=====

Using hg-fast-export is quite simple for a mercurial repository <repo>:

  bzr init-repo foo.bzr
  cd foo.bzr
  hg-fast-import.py -r <repo> | 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