comparison mercurial/revlog.py @ 10914:b7ca37b90762 stable

revlog: fix lazyparser.__iter__() to return all revisions (issue2137) Previously, it only returned revisions that were in the revlog when it was originally opened; revisions added since then were invisible. This broke revlog._partialmatch() and therefore repo.lookup(). (Credit to Benoit Boissinot for simplifying my original test script and for the actual fix.)
author Greg Ward <greg-hg@gerg.ca>
date Wed, 14 Apr 2010 15:06:40 -0400
parents f2ecc5733c89
children c9543bc6be16 9c84395a338e
comparison
equal deleted inserted replaced
10913:f2ecc5733c89 10914:b7ca37b90762
292 return True 292 return True
293 self.p.loadmap() 293 self.p.loadmap()
294 return key in self.p.map 294 return key in self.p.map
295 def __iter__(self): 295 def __iter__(self):
296 yield nullid 296 yield nullid
297 for i in xrange(self.p.l): 297 for i, ret in enumerate(self.p.index):
298 ret = self.p.index[i]
299 if not ret: 298 if not ret:
300 self.p.loadindex(i) 299 self.p.loadindex(i)
301 ret = self.p.index[i] 300 ret = self.p.index[i]
302 if isinstance(ret, str): 301 if isinstance(ret, str):
303 ret = _unpack(indexformatng, ret) 302 ret = _unpack(indexformatng, ret)