--- a/mercurial/context.py Tue Jun 24 17:27:18 2014 +0100
+++ b/mercurial/context.py Fri Aug 15 14:29:30 2014 +0900
@@ -777,9 +777,12 @@
size = len(text.splitlines())
return ([(rev, i) for i in xrange(1, size + 1)], text)
- decorate = (((linenumber is None) and decorate_compat) or
- (linenumber and with_linenumber) or
- without_linenumber)
+ if linenumber is None:
+ decorate = decorate_compat
+ elif linenumber:
+ decorate = with_linenumber
+ else:
+ decorate = without_linenumber
def pair(parent, child):
blocks = mdiff.allblocks(parent[1], child[1], opts=diffopts,