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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Sep 30 09:39:18 EDT 2017


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

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):



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


More information about the Mercurial-devel mailing list