hg-reset.sh: Helper for partially re-importing from hg
[fast-export/benizi.git] / hg-fast-export.txt
blob2fdabab11656e497d5ff9f299f1381f2232711d3
1 hg-fast-import.(sh|py) - mercurial to git converter using git-fast-import
3 Legal
4 =====
6 The scripts are licensed under the MIT license[0] and were written by
7 Rocco Rutte <pdmef@gmx.net> with hints and help from the git list and
8 #mercurial on freenode.
10 Usage
11 =====
13 Using it is quite simple for a mercurial repository <repo>:
15   mkdir repo-git # or whatever
16   cd repo-git
17   git init
18   hg-fast-import.sh -r <repo>
20 Incremental imports to track hg repos is supported, too.
22 Notes/Limitations
23 =================
25 hg-fast-import supports multiple branches but only named branches with exaclty
26 one head each. Otherwise commits to the tip of these heads within branch
27 will get flattened into merge commits.
29 As each git-fast-import run creates a new pack file, it may be required
30 to repack the repository quite often for incremental imports (especially
31 when importing a small number of changesets per incremental import).
33 Design
34 ======
36 hg-fast-import.py was designed in a way that doesn't require a 2-pass mechanism
37 or any prior repository analysis: if just feeds what it finds into
38 git-fast-import. This also implies that it heavily relies on strictly
39 linear ordering of changesets from hg, i.e. its append-only storage
40 model so that changesets hg-fast-import already saw never get modified.
42 Todo
43 ====
45 For incremental imports, handling tags needs to be reworked (maybe):
46 Right now we assume that once a tag is created, it stays forever and
47 never changes. However,
49   1) tags in hg may be removed
50   2) tags may change
52 I'm not yet sure how to handle this and how this interferes with
53 non-hg-based tags in git.
55 The same for branches: They may get removed.
57 For one-time conversions, everything is fine.
59 Footnotes
60 =========
62 [0] http://www.opensource.org/licenses/mit-license.php