D4149: linelog: extract `len(self._program)` to a local function
quark (Jun Wu)
phabricator at mercurial-scm.org
Mon Aug 6 22:04:35 EDT 2018
quark updated this revision to Diff 10026.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4149?vs=10024&id=10026
REVISION DETAIL
https://phab.mercurial-scm.org/D4149
AFFECTED FILES
mercurial/linelog.py
CHANGE DETAILS
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
To: quark, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list