Patchwork D8398: fastexport: fix diagnostics

login
register
mail settings
Submitter phabricator
Date April 13, 2020, 4:12 p.m.
Message ID <c4ea406e5537ed9fd78d1064f2ce68cb@localhost.localdomain>
Download mbox | patch
Permalink /patch/46071/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2020, 4:12 p.m.
Closed by commit rHG4c806a5fe254: fastexport: fix diagnostics (authored by joerg.sonnenberger).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D8398?vs=21033&id=21040#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8398?vs=21033&id=21040

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8398/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8398

AFFECTED FILES
  hgext/fastexport.py
  tests/test-fastexport.t

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

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 '<badname> <bad email>' --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]
diff --git a/hgext/fastexport.py b/hgext/fastexport.py
--- a/hgext/fastexport.py
+++ b/hgext/fastexport.py
@@ -42,7 +42,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'>'