comparison mercurial/cmdutil.py @ 12971:15390d1a3cfc stable

cmdutil: move range check outside of filerevgen Simple refactor, no logic change.
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Thu, 11 Nov 2010 02:05:02 +0900
parents 4ff61287bde2
children 7916a84c0758
comparison
equal deleted inserted replaced
12969:6bd9778ae749 12971:15390d1a3cfc
1136 linkrev = filelog.linkrev(j) 1136 linkrev = filelog.linkrev(j)
1137 if linkrev < minrev: 1137 if linkrev < minrev:
1138 continue 1138 continue
1139 # only yield rev for which we have the changelog, it can 1139 # only yield rev for which we have the changelog, it can
1140 # happen while doing "hg log" during a pull or commit 1140 # happen while doing "hg log" during a pull or commit
1141 if linkrev > maxrev or linkrev >= cl_count: 1141 if linkrev >= cl_count:
1142 break 1142 break
1143 1143
1144 parentlinkrevs = [] 1144 parentlinkrevs = []
1145 for p in filelog.parentrevs(j): 1145 for p in filelog.parentrevs(j):
1146 if p != nullrev: 1146 if p != nullrev:
1178 # keep track of all ancestors of the file 1178 # keep track of all ancestors of the file
1179 ancestors = set([filelog.linkrev(last)]) 1179 ancestors = set([filelog.linkrev(last)])
1180 1180
1181 # iterate from latest to oldest revision 1181 # iterate from latest to oldest revision
1182 for rev, flparentlinkrevs, copied in filerevgen(filelog, last): 1182 for rev, flparentlinkrevs, copied in filerevgen(filelog, last):
1183 if rev not in ancestors: 1183 if rev > maxrev or rev not in ancestors:
1184 continue 1184 continue
1185 # XXX insert 1327 fix here 1185 # XXX insert 1327 fix here
1186 if flparentlinkrevs: 1186 if flparentlinkrevs:
1187 ancestors.update(flparentlinkrevs) 1187 ancestors.update(flparentlinkrevs)
1188 1188