Patchwork D6206: branchmap: implement __contains__()

login
register
mail settings
Submitter phabricator
Date April 13, 2019, 1:15 a.m.
Message ID <bc445b4bc6598aed999b298547f9ee91@localhost.localdomain>
Download mbox | patch
Permalink /patch/39581/
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 rHGf0def07fa82f: branchmap: implement __contains__() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6206?vs=14675&id=14726

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

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
@@ -182,6 +182,9 @@ 
     def __getitem__(self, key):
         return self._entries[key]
 
+    def __contains__(self, key):
+        return key in self._entries
+
     def iteritems(self):
         return self._entries.iteritems()