py3: add b'' prefixes in tests/test-custom-filters.t
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D3595
--- 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