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

login
register
mail settings
Submitter phabricator
Date Dec. 1, 2017, 2:13 p.m.
Message ID <fd6cc909033b71d6174f749093d40b6e@localhost.localdomain>
Download mbox | patch
Permalink /patch/25862/
State Not Applicable
Headers show

Comments

phabricator - Dec. 1, 2017, 2:13 p.m.
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




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

Patch

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))