D3595: py3: add b'' prefixes in tests/test-custom-filters.t

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat May 19 15:39:07 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6e713711331b: py3: add b'' prefixes in tests/test-custom-filters.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3595?vs=8766&id=8800

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

AFFECTED FILES
  tests/test-custom-filters.t

CHANGE DETAILS

diff --git a/tests/test-custom-filters.t b/tests/test-custom-filters.t
--- a/tests/test-custom-filters.t
+++ b/tests/test-custom-filters.t
@@ -12,15 +12,15 @@
   $ cat > prefix.py <<EOF
   > from mercurial import error
   > def stripprefix(s, cmd, filename, **kwargs):
-  >     header = '%s\n' % cmd
+  >     header = b'%s\n' % cmd
   >     if s[:len(header)] != header:
-  >         raise error.Abort('missing header "%s" in %s' % (cmd, filename))
+  >         raise error.Abort(b'missing header "%s" in %s' % (cmd, filename))
   >     return s[len(header):]
   > def insertprefix(s, cmd):
-  >     return '%s\n%s' % (cmd, s)
+  >     return b'%s\n%s' % (cmd, s)
   > def reposetup(ui, repo):
-  >     repo.adddatafilter('stripprefix:', stripprefix)
-  >     repo.adddatafilter('insertprefix:', insertprefix)
+  >     repo.adddatafilter(b'stripprefix:', stripprefix)
+  >     repo.adddatafilter(b'insertprefix:', insertprefix)
   > EOF
 
   $ cat > .hgignore <<EOF



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


More information about the Mercurial-devel mailing list