##// END OF EJS Templates
context: also return ancestor's line range in blockancestors
Denis Laxalde -
r31076:0e07855e default
parent child Browse files
Show More
@@ -1179,7 +1179,7 b' def blockancestors(fctx, fromline, tolin'
1179 1179 pl = pl[:1]
1180 1180 if not pl:
1181 1181 # The block originates from the initial revision.
1182 yield c
1182 yield c, linerange2
1183 1183 continue
1184 1184 inrange = False
1185 1185 for p in pl:
@@ -1192,7 +1192,7 b' def blockancestors(fctx, fromline, tolin'
1192 1192 continue
1193 1193 visit[p.linkrev(), p.filenode()] = p, linerange1
1194 1194 if inrange:
1195 yield c
1195 yield c, linerange2
1196 1196
1197 1197 class committablectx(basectx):
1198 1198 """A committablectx object provides common functionality for a context that
@@ -952,7 +952,8 b' def followlines(repo, subset, x):'
952 952 fromline -= 1
953 953
954 954 fctx = repo[rev].filectx(fname)
955 revs = (c.rev() for c in context.blockancestors(fctx, fromline, toline))
955 revs = (c.rev() for c, _linerange
956 in context.blockancestors(fctx, fromline, toline))
956 957 return subset & generatorset(revs, iterasc=False)
957 958
958 959 @predicate('all()', safe=True)
General Comments 0
You need to be logged in to leave comments. Login now