diff --git a/hgext/fastexport.py b/hgext/fastexport.py --- a/hgext/fastexport.py +++ b/hgext/fastexport.py @@ -33,7 +33,6 @@ GIT_PERSON_PROHIBITED = re.compile(b'[<>\n"]') GIT_EMAIL_PROHIBITED = re.compile(b"[<> \n]") - def convert_to_git_user(authormap, user, rev): mapped_user = authormap.get(user, user) user_person = stringutil.person(mapped_user) @@ -42,7 +41,8 @@ user_person ): raise error.Abort( - _(b"Unable to parse user into person and email for revision " + rev) + _(b"Unable to parse user into person and email for revision %s") + % pycompat.bytestr(rev) ) if user_person: return b'"' + user_person + b'" <' + user_email + b'>' diff --git a/tests/test-fastexport.t b/tests/test-fastexport.t --- a/tests/test-fastexport.t +++ b/tests/test-fastexport.t @@ -853,3 +853,13 @@ M 644 :5 nf1 M 644 :6 of + $ echo foo > of + $ hg commit --user ' ' --date 'Fri Jan 02 00:00:00 1970 +0000' -m 'Testcommit' + $ hg fastexport --import-marks fastexport.marks -r tip + blob + mark :50 + data 4 + foo + + abort: Unable to parse user into person and email for revision 4f71ca786403919cd16669d94ff7cd1c09437a44 + [255]