##// END OF EJS Templates
ancestor: use heapreplace() in place of heappop/heappush()...
Yuya Nishihara -
r39574:238a1480 default
parent child Browse files
Show More
@@ -264,6 +264,7 b' def _lazyancestorsiter(parentrevs, initr'
264 264 seen = {nullrev}
265 265 heappush = heapq.heappush
266 266 heappop = heapq.heappop
267 heapreplace = heapq.heapreplace
267 268 see = seen.add
268 269
269 270 if inclusive:
@@ -294,8 +295,7 b' def _lazyancestorsiter(parentrevs, initr'
294 295 if current - p1 == 1:
295 296 visit[0] = -p1
296 297 else:
297 heappop(visit)
298 heappush(visit, -p1)
298 heapreplace(visit, -p1)
299 299 see(p1)
300 300 else:
301 301 heappop(visit)
General Comments 0
You need to be logged in to leave comments. Login now