hg-fast-export: support new --hgtags option
[fast-export.git] / README
blobe8e855c7118f3cd0bb7b8d28aeb4675c219da7e4
1 hg-fast-export.(sh|py) - mercurial to git converter using git-fast-import
3 Legal
4 =====
6 Most hg-* scripts are licensed under the MIT license[0] and were written
7 by Rocco Rutte <pdmef@gmx.net> with hints and help from the git list and
8 #mercurial on freenode. hg-reset.py is licensed under GPLv2 since it
9 copies some code from the mercurial sources.
11 The current maintainer is Frej Drejhammar <frej.drejhammar@gmail.com>.
13 Usage
14 =====
16 Using hg-fast-export is quite simple for a mercurial repository <repo>:
18   mkdir repo-git # or whatever
19   cd repo-git
20   git init
21   hg-fast-export.sh -r <repo>
23 Incremental imports to track hg repos is supported, too.
25 Using hg-reset it is quite simple within a git repository that is
26 hg-fast-export'ed from mercurial:
28   hg-reset.sh -R <revision>
30 will give hints on which branches need adjustment for starting over
31 again.
33 As mercurial appears to be much less picky about the syntax of the
34 author information than git, an author mapping file can be given to
35 hg-fast-export to fix up malformed author strings. The file is
36 specified using the -A option. The file should contain lines of the
37 form "FromAuthor=ToAuthor". The example authors.map below will
38 translate "User <garbage<user@example.com>" to "User <user@example.com>".
40 -- Start of authors.map --
41 User <garbage<user@example.com>=User <user@example.com>
42 -- End of authors.map --
44 Notes/Limitations
45 =================
47 hg-fast-export supports multiple branches but only named branches with
48 exactly one head each. Otherwise commits to the tip of these heads
49 within the branch will get flattened into merge commits.
51 As each git-fast-import run creates a new pack file, it may be
52 required to repack the repository quite often for incremental imports
53 (especially when importing a small number of changesets per
54 incremental import).
56 The way the hg API and remote access protocol is designed it is not
57 possible to use hg-fast-export on remote repositories
58 (http/ssh). First clone the repository, then convert it.
60 Design
61 ======
63 hg-fast-export.py was designed in a way that doesn't require a 2-pass
64 mechanism or any prior repository analysis: if just feeds what it
65 finds into git-fast-import. This also implies that it heavily relies
66 on strictly linear ordering of changesets from hg, i.e. its
67 append-only storage model so that changesets hg-fast-export already
68 saw never get modified.
70 Submitting Patches
71 ==================
73 Please use the issue-tracker at github
74 https://github.com/frej/fast-export to report bugs and submit
75 patches.
77 Footnotes
78 =========
80 [0] http://www.opensource.org/licenses/mit-license.php