diff -r ada8a19672ab -r 0fa781320203 mercurial/context.py --- a/mercurial/context.py Thu Sep 07 22:36:54 2017 +0900 +++ b/mercurial/context.py Sun Sep 03 14:32:11 2017 +0900 @@ -1112,16 +1112,16 @@ Additionally, if `skipchild` is True, replace all other lines with parent annotate data as well such that child is never blamed for any lines. - >>> oldfctx = 'old' - >>> p1fctx, p2fctx, childfctx = 'p1', 'p2', 'c' - >>> olddata = 'a\nb\n' - >>> p1data = 'a\nb\nc\n' - >>> p2data = 'a\nc\nd\n' - >>> childdata = 'a\nb2\nc\nc2\nd\n' + >>> oldfctx = b'old' + >>> p1fctx, p2fctx, childfctx = b'p1', b'p2', b'c' + >>> olddata = b'a\nb\n' + >>> p1data = b'a\nb\nc\n' + >>> p2data = b'a\nc\nd\n' + >>> childdata = b'a\nb2\nc\nc2\nd\n' >>> diffopts = mdiff.diffopts() >>> def decorate(text, rev): - ... return ([(rev, i) for i in xrange(1, text.count('\n') + 1)], text) + ... return ([(rev, i) for i in xrange(1, text.count(b'\n') + 1)], text) Basic usage: