Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 34146:0fa781320203
doctest: bulk-replace string literals with b'' for Python 3
Our code transformer can't rewrite string literals in docstrings, and I
don't want to make the transformer more complex.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 14:32:11 +0900 |
parents | f698bb31bdfb |
children | 255c761a52db |
line wrap: on
line diff
--- 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: