diff --git a/mercurial/manifest.py b/mercurial/manifest.py
index b1179dabc6de9a215b2305c7209b64b764526c39_bWVyY3VyaWFsL21hbmlmZXN0LnB5..6f53629ad2733199ae2194bfb33569cf7b2fef1d_bWVyY3VyaWFsL21hbmlmZXN0LnB5 100644
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -17,6 +17,9 @@
             flags = {}
         dict.__init__(self, mapping)
         self._flags = flags
+    def __setitem__(self, k, v):
+        assert v is not None
+        dict.__setitem__(self, k, v)
     def flags(self, f):
         return self._flags.get(f, "")
     def withflags(self):