Patchwork D1674: py3: pass bytes from extension to ui.write() in test-revlog-mmapindex.t

login
register
mail settings
Submitter phabricator
Date Dec. 12, 2017, 11:26 p.m.
Message ID <differential-rev-PHID-DREV-f6vixtefpfom4gz7ic6l-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26254/
State Superseded
Headers show

Comments

phabricator - Dec. 12, 2017, 11:26 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This makes the test pass on Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-revlog-mmapindex.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-revlog-mmapindex.t b/tests/test-revlog-mmapindex.t
--- a/tests/test-revlog-mmapindex.t
+++ b/tests/test-revlog-mmapindex.t
@@ -6,12 +6,13 @@ 
   > 
   > from mercurial import (
   >     extensions,
+  >     pycompat,
   >     util,
   > )
   > 
   > def extsetup(ui):
   >     def mmapread(orig, fp):
-  >         ui.write("mmapping %s\n" % fp.name)
+  >         ui.write(b"mmapping %s\n" % pycompat.bytestr(fp.name))
   >         ui.flush()
   >         return orig(fp)
   >