Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 32922:582080a4a812
dagop: move blockancestors() and blockdescendants() from context
context.py seems not a good place to host these functions.
% wc -l mercurial/context.py mercurial/dagop.py
2306 mercurial/context.py
424 mercurial/dagop.py
2730 total
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 19 Feb 2017 19:37:14 +0900 |
parents | 27932a76a88d |
children | 2851b24eecc4 |
line wrap: on
line diff
--- a/mercurial/revset.py Sun Oct 16 18:03:24 2016 +0900 +++ b/mercurial/revset.py Sun Feb 19 19:37:14 2017 +0900 @@ -827,8 +827,6 @@ descendants of 'startrev' are returned though renames are (currently) not followed in this direction. """ - from . import context # avoid circular import issues - args = getargsdict(x, 'followlines', 'file *lines startrev descend') if len(args['lines']) != 1: raise error.ParseError(_("followlines requires a line range")) @@ -868,12 +866,12 @@ if descend: rs = generatorset( (c.rev() for c, _linerange - in context.blockdescendants(fctx, fromline, toline)), + in dagop.blockdescendants(fctx, fromline, toline)), iterasc=True) else: rs = generatorset( (c.rev() for c, _linerange - in context.blockancestors(fctx, fromline, toline)), + in dagop.blockancestors(fctx, fromline, toline)), iterasc=False) return subset & rs