##// END OF EJS Templates
py3: add b'' prefixes in tests/test-custom-filters.t...
Pulkit Goyal -
r38082:6e713711 default
parent child Browse files
Show More
@@ -12,15 +12,15 b''
12 $ cat > prefix.py <<EOF
12 $ cat > prefix.py <<EOF
13 > from mercurial import error
13 > from mercurial import error
14 > def stripprefix(s, cmd, filename, **kwargs):
14 > def stripprefix(s, cmd, filename, **kwargs):
15 > header = '%s\n' % cmd
15 > header = b'%s\n' % cmd
16 > if s[:len(header)] != header:
16 > if s[:len(header)] != header:
17 > raise error.Abort('missing header "%s" in %s' % (cmd, filename))
17 > raise error.Abort(b'missing header "%s" in %s' % (cmd, filename))
18 > return s[len(header):]
18 > return s[len(header):]
19 > def insertprefix(s, cmd):
19 > def insertprefix(s, cmd):
20 > return '%s\n%s' % (cmd, s)
20 > return b'%s\n%s' % (cmd, s)
21 > def reposetup(ui, repo):
21 > def reposetup(ui, repo):
22 > repo.adddatafilter('stripprefix:', stripprefix)
22 > repo.adddatafilter(b'stripprefix:', stripprefix)
23 > repo.adddatafilter('insertprefix:', insertprefix)
23 > repo.adddatafilter(b'insertprefix:', insertprefix)
24 > EOF
24 > EOF
25
25
26 $ cat > .hgignore <<EOF
26 $ cat > .hgignore <<EOF
General Comments 0
You need to be logged in to leave comments. Login now