mercurial/pure/parsers.py
branchstable
changeset 13435 90d7ce986565
parent 13261 20a54bdf2328
child 14064 e4bfb9c337f3
--- a/mercurial/pure/parsers.py	Thu Feb 17 17:15:32 2011 -0500
+++ b/mercurial/pure/parsers.py	Thu Feb 17 13:37:52 2011 -0200
@@ -56,10 +56,11 @@
             n += 1
             off += s
 
-    e = list(index[0])
-    type = gettype(e[0])
-    e[0] = offset_type(0, type)
-    index[0] = tuple(e)
+    if index:
+        e = list(index[0])
+        type = gettype(e[0])
+        e[0] = offset_type(0, type)
+        index[0] = tuple(e)
 
     # add the magic null revision at -1
     index.append((0, 0, 0, -1, -1, -1, -1, nullid))