py3: add b'' prefixes in tests/test-custom-filters.t
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 19 May 2018 18:27:57 +0530
changeset 38071 6e713711331b
parent 38070 fc3cca406b2e
child 38072 d1a49a94c324
py3: add b'' prefixes in tests/test-custom-filters.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3595
tests/test-custom-filters.t
--- a/tests/test-custom-filters.t	Sat May 19 18:26:38 2018 +0530
+++ b/tests/test-custom-filters.t	Sat May 19 18:27:57 2018 +0530
@@ -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