D10201: bisect: replace a missing method on the list primitive

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sat Mar 13 19:34:20 UTC 2021


mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Caught by pytype:
  
    File "/mnt/c/Users/Matt/hg/mercurial/commands.py", line 1095, in bisect: No attribute 'last' on list [attribute-error]
      In list

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1083,7 +1083,7 @@
         if rev:
             if not nodes:
                 raise error.Abort(_(b'empty revision set'))
-            node = repo[nodes.last()].node()
+            node = repo[nodes[-1]].node()
         with hbisect.restore_state(repo, state, node):
             while changesets:
                 # update state



To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list