mercurialリポジトリをgitに変換しようと hg-fast-export.sh したら死亡
結論としては
変換元のhgリポジトリのコミッタとして "<>" が居ると死ぬらしい。
解決策
コミッタのマッピングファイルを作成して指定しましょう。端折ると死ぬ。
# マッピングファイルの例 <>=devnull <devnull@localhost>
# マッピングファイルを指定して変換 $ ../fast-export/hg-fast-export.sh -r ../editor_configs_hg/ -A ../authors
問題発生時のログとかポイントとか
-A
を指定なしで実行<> <devnull@localhost>
でなんか死んでる
[ir9@hina-pc editor_config]$ ../fast-export/hg-fast-export.sh -r ../editor_configs_hg/ master: Exporting full revision 1/9 with 14/0/0 added/changed/removed files master: Exporting simple delta revision 2/9 with 2/0/0 added/changed/removed files master: Exporting simple delta revision 3/9 with 1/0/1 added/changed/removed files master: Exporting simple delta revision 4/9 with 3/0/0 added/changed/removed files master: Exporting simple delta revision 5/9 with 1/0/0 added/changed/removed files master: Exporting simple delta revision 6/9 with 4/0/0 added/changed/removed files fatal: Invalid raw date "<devnull@localhost> 1434525763 +0900" in ident: <> <devnull@localhost> 1434525763 +0900 fast-import: dumping crash report to .git/fast_import_crash_11997 master: Exporting simple delta revision 7/9 with 3/0/0 added/changed/removed files Traceback (most recent call last): File "../fast-export/hg-fast-export.py", line 427, in <module> options.statusfile,authors=a,sob=options.sob,force=options.force,hgtags=options.hgtags,notes=options.notes)) File "../fast-export/hg-fast-export.py", line 357, in hg2git c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap,hgtags,notes) File "../fast-export/hg-fast-export.py", line 218, in export_commit export_file_contents(ctx,man,added,hgtags) File "../fast-export/hg-fast-export.py", line 136, in export_file_contents wr(d) File "../fast-export/hg-fast-export.py", line 37, in wr wr_no_nl(msg) File "../fast-export/hg-fast-export.py", line 34, in wr_no_nl sys.stdout.write(msg) IOError: [Errno 32] Broken pipe
改修後の上手くいったログ例
-A
を指定したところうまくいきました
[ir9@hina-pc editor_config]$ ../fast-export/hg-fast-export.sh -r ../editor_configs_hg/ -A ../authors Loaded 1 authors master: Exporting full revision 1/9 with 14/0/0 added/changed/removed files master: Exporting simple delta revision 2/9 with 2/0/0 added/changed/removed files master: Exporting simple delta revision 3/9 with 1/0/1 added/changed/removed files master: Exporting simple delta revision 4/9 with 3/0/0 added/changed/removed files master: Exporting simple delta revision 5/9 with 1/0/0 added/changed/removed files master: Exporting simple delta revision 6/9 with 4/0/0 added/changed/removed files master: Exporting simple delta revision 7/9 with 3/0/0 added/changed/removed files master: Exporting simple delta revision 8/9 with 8/1/0 added/changed/removed files master: Exporting thorough delta revision 9/9 with 15/1/0 added/changed/removed files Issued 9 commands git-fast-import statistics: --------------------------------------------------------------------- Alloc'd objects: 5000 Total objects: 30 ( 54 duplicates ) blobs : 14 ( 39 duplicates 1 deltas of 14 attempts) trees : 12 ( 10 duplicates 4 deltas of 12 attempts) commits: 4 ( 5 duplicates 0 deltas of 0 attempts) tags : 0 ( 0 duplicates 0 deltas of 0 attempts) Total branches: 1 ( 1 loads ) marks: 1024 ( 9 unique ) atoms: 38 Memory total: 2344 KiB pools: 2110 KiB objects: 234 KiB --------------------------------------------------------------------- pack_report: getpagesize() = 4096 pack_report: core.packedGitWindowSize = 1073741824 pack_report: core.packedGitLimit = 8589934592 pack_report: pack_used_ctr = 44 pack_report: pack_mmap_calls = 6 pack_report: pack_open_windows = 2 / 2 pack_report: pack_mapped = 48588 / 48588 ---------------------------------------------------------------------