# HG changeset patch # User Matt Mackall # Date 2015-01-11 20:44:57 # Node ID ffca0a14b566a83a6bb230b5574401d0fc2e198c # Parent 86d2a0c41f44913e60dbfa4471735686737be8bd readmarkers: hoist subtraction out of loop comparison diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -287,9 +287,9 @@ def _fm0decodemeta(data): def _fm1readmarkers(data, off=0): # Loop on markers - l = len(data) + stop = len(data) - _fm1fsize ufixed = util.unpacker(_fm1fixed) - while off + _fm1fsize <= l: + while off <= stop: # read fixed part o1 = off + _fm1fsize fixeddata = ufixed(data[off:o1])