Patchwork D4149: linelog: extract `len(self._program)` to a local function

login
register
mail settings
Submitter phabricator
Date Aug. 9, 2018, 6:06 p.m.
Message ID <d39ac972f4c7b2b1aff78cf7a4ef20ef@localhost.localdomain>
Download mbox | patch
Permalink /patch/33481/
State Not Applicable
Headers show

Comments

phabricator - Aug. 9, 2018, 6:06 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG32b1967b8734: linelog: extract `len(self._program)` to a local function (authored by quark, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4149?vs=10066&id=10134

REVISION DETAIL
  https://phab.mercurial-scm.org/D4149

AFFECTED FILES
  mercurial/linelog.py

CHANGE DETAILS




To: quark, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/linelog.py b/mercurial/linelog.py
--- a/mercurial/linelog.py
+++ b/mercurial/linelog.py
@@ -308,7 +308,8 @@ 
         else:
             a1info = ar.lines[a1]
             a1inst = self._program[a1info._offset]
-        oldproglen = len(self._program)
+        programlen = self._program.__len__
+        oldproglen = programlen()
         appendinst = self._program.append
 
         # insert