diff hgext/fastexport.py @ 44821:edffab2cf0ea stable

fastexport: adjust output to be more canonical For time zones, git doesn't consider +0 and -0 the same timezone, so use the former canonically. Add a test case to ensure that non-UTC offsets are handled correctly. The real name part of the committer name is normally not quoted, so don't enforce that. Differential Revision: https://phab.mercurial-scm.org/D8522
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 12 May 2020 22:20:56 +0200
parents 5d309906ed0e
children 5ced12cfa41b
line wrap: on
line diff
--- a/hgext/fastexport.py	Mon May 11 08:13:40 2020 +0200
+++ b/hgext/fastexport.py	Tue May 12 22:20:56 2020 +0200
@@ -53,7 +53,7 @@
 
 def convert_to_git_date(date):
     timestamp, utcoff = date
-    tzsign = b"+" if utcoff < 0 else b"-"
+    tzsign = b"+" if utcoff <= 0 else b"-"
     if utcoff % 60 != 0:
         raise error.Abort(
             _(b"UTC offset in %b is not an integer number of seconds") % (date,)