comparison mercurial/context.py @ 23981:24b57c3899f8 stable

filectx: use linkrev to sort ancestors We're going to make rev() lazily do _adjustlinkrevs, and we don't want that to happen when we're quickly tracing through file ancestry without caring about revs (as we do when finding copies). This takes us back to pre-linkrev-correction behavior, but shouldn't regress us relative to the last stable release.
author Matt Mackall <mpm@selenic.com>
date Sun, 01 Feb 2015 16:23:07 -0600
parents c1ce5442453f
children ff070a53ee74
comparison
equal deleted inserted replaced
23980:c1ce5442453f 23981:24b57c3899f8
952 visit = {} 952 visit = {}
953 c = self 953 c = self
954 cut = followfirst and 1 or None 954 cut = followfirst and 1 or None
955 while True: 955 while True:
956 for parent in c.parents()[:cut]: 956 for parent in c.parents()[:cut]:
957 visit[(parent.rev(), parent.node())] = parent 957 visit[(parent.linkrev(), parent.filenode())] = parent
958 if not visit: 958 if not visit:
959 break 959 break
960 c = visit.pop(max(visit)) 960 c = visit.pop(max(visit))
961 yield c 961 yield c
962 962