Patchwork D6205: branchmap: prevent using __getitem__() in branchheads()

login
register
mail settings
Submitter phabricator
Date April 13, 2019, 1:15 a.m.
Message ID <985c11dbea1525c62fbff454f195d751@localhost.localdomain>
Download mbox | patch
Permalink /patch/39580/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2019, 1:15 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG29c22496dd97: branchmap: prevent using __getitem__() in branchheads() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6205?vs=14674&id=14725

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

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -290,7 +290,7 @@ 
         return (n for n in nodes if n not in self._closednodes)
 
     def branchheads(self, branch, closed=False):
-        heads = self[branch]
+        heads = self._entries[branch]
         if not closed:
             heads = list(self.iteropen(heads))
         return heads