Skip to content

Commit 7f501cb

Browse files
committed
import-hg: Mention tag and branch mapping files
Users frequently submit summarily rejected patches doing some magit branch and tag name munging to the hg-fast-export project instead of using a mapping file. Try to prevent wasted work by mentioning the existence of mapping files for branches and tags when author mapping files are covered.
1 parent ebf4b28 commit 7f501cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

book/09-git-and-other-scms/sections/import-hg.asc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ In this example, we want our file to look like this:
5252
"bob jones <bob <AT> company <DOT> com>"="Bob Jones <[email protected]>"
5353
----
5454

55+
The same kind of mapping file can be used to rename branches and tags when the Mercurial name is not allowed by Git.
56+
5557
The next step is to create our new Git repository, and run the export script:
5658

5759
[source,console]
@@ -61,7 +63,7 @@ $ cd /tmp/converted
6163
$ /tmp/fast-export/hg-fast-export.sh -r /tmp/hg-repo -A /tmp/authors
6264
----
6365

64-
The `-r` flag tells hg-fast-export where to find the Mercurial repository we want to convert, and the `-A` flag tells it where to find the author-mapping file.
66+
The `-r` flag tells hg-fast-export where to find the Mercurial repository we want to convert, and the `-A` flag tells it where to find the author-mapping file (branch and tag mapping files are specified by the `-B` and `-T` flags respectively).
6567
The script parses Mercurial changesets and converts them into a script for Git's "fast-import" feature (which we'll discuss in detail a bit later on).
6668
This takes a bit (though it's _much_ faster than it would be over the network), and the output is fairly verbose:
6769

0 commit comments

Comments
 (0)