diff -r 87a7c0d403ff -r 9d06b65c5df2 mercurial/manifest.py --- 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):