Mercurial > hg
comparison mercurial/revset.py @ 31076:0e07855e6054
context: also return ancestor's line range in blockancestors
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Mon, 16 Jan 2017 17:14:36 +0100 |
parents | 0b8356705de6 |
children | 080734cd2440 |
comparison
equal
deleted
inserted
replaced
31075:21f1f97ab212 | 31076:0e07855e6054 |
---|---|
950 if fromline < 1: | 950 if fromline < 1: |
951 raise error.ParseError(_("fromline must be strictly positive")) | 951 raise error.ParseError(_("fromline must be strictly positive")) |
952 fromline -= 1 | 952 fromline -= 1 |
953 | 953 |
954 fctx = repo[rev].filectx(fname) | 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 return subset & generatorset(revs, iterasc=False) | 957 return subset & generatorset(revs, iterasc=False) |
957 | 958 |
958 @predicate('all()', safe=True) | 959 @predicate('all()', safe=True) |
959 def getall(repo, subset, x): | 960 def getall(repo, subset, x): |
960 """All changesets, the same as ``0:tip``. | 961 """All changesets, the same as ``0:tip``. |