D5061: f: fix a Python 3 bytes/string issue

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon Oct 15 11:22:22 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGda1629c7dda1: f: fix a Python 3 bytes/string issue (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5061?vs=12070&id=12155

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

AFFECTED FILES
  tests/f

CHANGE DETAILS

diff --git a/tests/f b/tests/f
--- a/tests/f
+++ b/tests/f
@@ -88,9 +88,11 @@
             if opts.newer:
                 # mtime might be in whole seconds so newer file might be same
                 if stat.st_mtime >= os.stat(opts.newer).st_mtime:
-                    facts.append(b'newer than %s' % opts.newer)
+                    facts.append(b'newer than %s' % opts.newer.encode(
+                        'utf8', 'replace'))
                 else:
-                    facts.append(b'older than %s' % opts.newer)
+                    facts.append(b'older than %s' % opts.newer.encode(
+                        'utf8', 'replace'))
         if opts.md5 and content is not None:
             h = hashlib.md5(content)
             facts.append(b'md5=%s' % binascii.hexlify(h.digest())[:opts.bytes])



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list