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

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 12, 2014, 11:09 p.m.
Message ID <900a9b80092255c0fed0.1415833748@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/6696/
State Accepted
Commit 8d47c212b0ddab2d69b11f1a4cdaf830b760dd4d
Headers show

Comments

Siddharth Agarwal - Nov. 12, 2014, 11:09 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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

Patch

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])