changeset 13266:a5db81b5d3e9

revlog/parseindex: construct the nodemap if it is empty
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 15 Jan 2011 15:06:53 +0100
parents 04b302ce2781
children a483b3183ee8
files mercurial/revlog.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Sat Jan 15 13:02:19 2011 +0100
+++ b/mercurial/revlog.py	Sat Jan 15 15:06:53 2011 +0100
@@ -176,7 +176,10 @@
     def parseindex(self, data, inline):
         # call the C implementation to parse the index data
         index, cache = parsers.parse_index2(data, inline)
-        return index, None, cache
+        nodemap = None
+        if not data:
+            nodemap = {nullid: nullrev}
+        return index, nodemap, cache
 
     def packentry(self, entry, node, version, rev):
         p = _pack(indexformatng, *entry)