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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Apr 12 21:15:14 EDT 2019


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

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



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


More information about the Mercurial-devel mailing list