From patchwork Tue Aug 1 20:34:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01, of, 10, py3] obsolete: reuse _fm1metapair for computing _fm1metapairsize From: Augie Fackler X-Patchwork-Id: 22609 Message-Id: <87ee5c3b3271ded54fe4.1501619669@augie-macbookpro2.roam.corp.google.com> To: mercurial-devel@mercurial-scm.org Date: Tue, 01 Aug 2017 16:34:29 -0400 # HG changeset patch # User Augie Fackler # Date 1500906083 14400 # Mon Jul 24 10:21:23 2017 -0400 # Node ID 87ee5c3b3271ded54fe4462aa43a9d1520b8a10b # Parent 658524d45af0dbb627b25d795ed84227a20fd634 obsolete: reuse _fm1metapair for computing _fm1metapairsize It's evaluated at import time, so it seems silly to not reuse the constant name. diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -314,7 +314,7 @@ def _fm0decodemeta(data): _fm1parentshift = 14 _fm1parentmask = (_fm1parentnone << _fm1parentshift) _fm1metapair = 'BB' -_fm1metapairsize = _calcsize('BB') +_fm1metapairsize = _calcsize(_fm1metapair) def _fm1purereadmarkers(data, off, stop): # make some global constants local for performance