Commit 153ff9ad authored by Jeremy Hylton's avatar Jeremy Hylton

Python 2.1 compatibility. "in" does not correspond to "has_key" in

2.1.
parent 11200d50
...@@ -481,7 +481,7 @@ class GC(FileStorageFormatter): ...@@ -481,7 +481,7 @@ class GC(FileStorageFormatter):
todo = list(roots) todo = list(roots)
while todo: while todo:
oid = todo.pop() oid = todo.pop()
if oid in self.reachable: if self.reachable.has_key(oid):
continue continue
L = [] L = []
...@@ -525,7 +525,7 @@ class GC(FileStorageFormatter): ...@@ -525,7 +525,7 @@ class GC(FileStorageFormatter):
self.checkData(th, tpos, dh, pos) self.checkData(th, tpos, dh, pos)
if dh.back and dh.back < self.packpos: if dh.back and dh.back < self.packpos:
if dh.oid in self.reachable: if self.reachable.has_key(dh.oid):
L = self.reach_ex.setdefault(dh.oid, []) L = self.reach_ex.setdefault(dh.oid, [])
if dh.back not in L: if dh.back not in L:
L.append(dh.back) L.append(dh.back)
...@@ -534,7 +534,7 @@ class GC(FileStorageFormatter): ...@@ -534,7 +534,7 @@ class GC(FileStorageFormatter):
self.reachable[dh.oid] = dh.back self.reachable[dh.oid] = dh.back
if dh.version and dh.pnv: if dh.version and dh.pnv:
if dh.oid in self.reachable: if self.reachable.has_key(dh.oid):
L = self.reach_ex.setdefault(dh.oid, []) L = self.reach_ex.setdefault(dh.oid, [])
if dh.pnv not in L: if dh.pnv not in L:
L.append(dh.pnv) L.append(dh.pnv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment