Fix revlog signature check for empty revlogs
authorMatt Mackall <mpm@selenic.com>
Sun, 29 Jan 2006 20:30:41 +1300
changeset 1660 b2df93c56ac4
parent 1659 bfa90d9a3b77
child 1661 b11507d6d16d
child 1663 d529cdc0a3ee
Fix revlog signature check for empty revlogs
mercurial/revlog.py
--- a/mercurial/revlog.py	Sun Jan 29 20:27:58 2006 +1300
+++ b/mercurial/revlog.py	Sun Jan 29 20:30:41 2006 +1300
@@ -197,7 +197,7 @@
                 raise
             i = ""
 
-        if i[:4] != "\0\0\0\0":
+        if i and i[:4] != "\0\0\0\0":
             raise RevlogError(_("incompatible revlog signature on %s") %
                               self.indexfile)