Mercurial > hg
changeset 13435:90d7ce986565 stable
pure: fix index parsing on empty repositories
author | Wagner Bruna <wbruna@softwareexpress.com.br> |
---|---|
date | Thu, 17 Feb 2011 13:37:52 -0200 |
parents | b5cc838dd999 |
children | b391c0c9be61 |
files | mercurial/pure/parsers.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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))