D1557: py3: use encoding.strtolocal() to convert string to bytes

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Dec 1 14:13:37 UTC 2017


pulkit updated this revision to Diff 4050.
pulkit retitled this revision from "py3: use pycompat.bytestr() to convert string to bytes" to "py3: use encoding.strtolocal() to convert string to bytes".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1557?vs=3981&id=4050

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

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -725,7 +725,8 @@
             mode = 'lnk'
         else:
             mode = '%3o' % (ent[1] & 0o777 & ~util.umask)
-        ui.write("%c %s %10d %s%s\n" % (ent[0], mode, ent[2], timestr, file_))
+        ui.write("%c %s %10d %s%s\n" % (ent[0], mode, ent[2],
+                 encoding.strtolocal(timestr), file_))
     for f in repo.dirstate.copies():
         ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))
 



To: pulkit, #hg-reviewers, yuja
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list