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

login
register
mail settings
Submitter phabricator
Date March 13, 2021, 7:34 p.m.
Message ID <differential-rev-PHID-DREV-3ly7jrv4ukekgz6n4egh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48523/
State Superseded
Headers show

Comments

phabricator - March 13, 2021, 7:34 p.m.
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




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

Patch

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