Mercurial > hg
changeset 77:bed15e766511
Fix bug in lazymap code
Add a sanity check to addgroup
author | mpm@selenic.com |
---|---|
date | Tue, 17 May 2005 01:07:01 -0800 |
parents | d993ebd69d28 |
children | 85f1f87dc8ff |
files | mercurial/revlog.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue May 17 00:33:22 2005 -0800 +++ b/mercurial/revlog.py Tue May 17 01:07:01 2005 -0800 @@ -82,7 +82,7 @@ self.p.load(pos) def __contains__(self, key): try: - self.p.map[key] + self[key] return True except KeyError: return False @@ -434,6 +434,8 @@ while pos < len(data): l, node, p1, p2, cs = struct.unpack(">l20s20s20s20s", data[pos:pos+84]) + if node in self.nodemap: + raise "already have %s" % hex(node[:4]) link = linkmapper(cs) delta = data[pos + 84:pos + l] pos += l