[PATCH 1 of 5 RFC] revlog: make a predicate clearer with parens

Siddharth Agarwal sid0 at fb.com
Wed Nov 12 23:09:08 UTC 2014


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1415770796 28800
#      Tue Nov 11 21:39:56 2014 -0800
# Node ID 900a9b80092255c0fed08016a69ec1ffbcca0a3f
# Parent  3480c07fc934a9c90c8dda1ed2bc98fd9c96c44a
revlog: make a predicate clearer with parens

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1255,7 +1255,7 @@
         else:
             textlen = len(text)
         if (d is None or dist > textlen * 2 or
-            self._maxchainlen and chainlen > self._maxchainlen):
+            (self._maxchainlen and chainlen > self._maxchainlen)):
             text = buildtext()
             data = self.compress(text)
             l = len(data[1]) + len(data[0])


More information about the Mercurial-devel mailing list