[Request] [+ ] D8675: ui: fix Python 2.7 support for ui.timestamp-output

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Thu Jul 2 17:55:18 UTC 2020


joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1229,7 +1229,7 @@
         }
         if timestamp:
             args = (
-                b'[%s] ' % bytes(datetime.datetime.now().isoformat(), 'ASCII'),
+                b'[%s] ' % pycompat.sysstr(datetime.datetime.now().isoformat()),
             ) + args
         _writemsgwith(self._write, dest, *args, **opts)
         if timestamp:



To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200702/324205f6/attachment.html>


More information about the Mercurial-patches mailing list