Patchwork D852: py3: return False early while checking whether None is a key in lazymanifest

login
register
mail settings
Submitter phabricator
Date Sept. 30, 2017, 1:39 p.m.
Message ID <6ac924d8812f3a2564d6cd966758c0ad@localhost.localdomain>
Download mbox | patch
Permalink /patch/24262/
State Not Applicable
Headers show

Comments

phabricator - Sept. 30, 2017, 1:39 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG05167447f90d: py3: return False early while checking whether None is a key in lazymanifest (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D852?vs=2177&id=2187

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

AFFECTED FILES
  mercurial/manifest.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -442,6 +442,8 @@ 
         self._lm[key] = node, self.flags(key, '')
 
     def __contains__(self, key):
+        if key is None:
+            return False
         return key in self._lm
 
     def __delitem__(self, key):