manifest: don't store None in fulltextcache
When we read a value from fulltextcache, we expect it to be an array,
so we should not store None in it. Found while working on narrowhg.
--- a/mercurial/manifest.py Tue Oct 18 02:09:08 2016 +0200
+++ b/mercurial/manifest.py Mon Oct 17 22:51:22 2016 -0700
@@ -1210,7 +1210,8 @@
n = self.addrevision(text, transaction, link, p1, p2)
arraytext = array.array('c', text)
- self.fulltextcache[n] = arraytext
+ if arraytext is not None:
+ self.fulltextcache[n] = arraytext
return n
@@ -1506,7 +1507,8 @@
m = self._newmanifest(text)
arraytext = array.array('c', text)
self._mancache[node] = m
- self.fulltextcache[node] = arraytext
+ if arraytext is not None:
+ self.fulltextcache[node] = arraytext
return m
def readshallow(self, node):