Show More
@@ -12,15 +12,15 b'' | |||
|
12 | 12 | $ cat > prefix.py <<EOF |
|
13 | 13 | > from mercurial import error |
|
14 | 14 | > def stripprefix(s, cmd, filename, **kwargs): |
|
15 | > header = '%s\n' % cmd | |
|
15 | > header = b'%s\n' % cmd | |
|
16 | 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 | 18 | > return s[len(header):] |
|
19 | 19 | > def insertprefix(s, cmd): |
|
20 | > return '%s\n%s' % (cmd, s) | |
|
20 | > return b'%s\n%s' % (cmd, s) | |
|
21 | 21 | > def reposetup(ui, repo): |
|
22 | > repo.adddatafilter('stripprefix:', stripprefix) | |
|
23 | > repo.adddatafilter('insertprefix:', insertprefix) | |
|
22 | > repo.adddatafilter(b'stripprefix:', stripprefix) | |
|
23 | > repo.adddatafilter(b'insertprefix:', insertprefix) | |
|
24 | 24 | > EOF |
|
25 | 25 | |
|
26 | 26 | $ cat > .hgignore <<EOF |
General Comments 0
You need to be logged in to leave comments.
Login now