equal
deleted
inserted
replaced
825 |
825 |
826 By default, ancestors of 'startrev' are returned. If 'descend' is True, |
826 By default, ancestors of 'startrev' are returned. If 'descend' is True, |
827 descendants of 'startrev' are returned though renames are (currently) not |
827 descendants of 'startrev' are returned though renames are (currently) not |
828 followed in this direction. |
828 followed in this direction. |
829 """ |
829 """ |
830 from . import context # avoid circular import issues |
|
831 |
|
832 args = getargsdict(x, 'followlines', 'file *lines startrev descend') |
830 args = getargsdict(x, 'followlines', 'file *lines startrev descend') |
833 if len(args['lines']) != 1: |
831 if len(args['lines']) != 1: |
834 raise error.ParseError(_("followlines requires a line range")) |
832 raise error.ParseError(_("followlines requires a line range")) |
835 |
833 |
836 rev = '.' |
834 rev = '.' |
866 # i18n: "descend" is a keyword |
864 # i18n: "descend" is a keyword |
867 _("descend argument must be a boolean")) |
865 _("descend argument must be a boolean")) |
868 if descend: |
866 if descend: |
869 rs = generatorset( |
867 rs = generatorset( |
870 (c.rev() for c, _linerange |
868 (c.rev() for c, _linerange |
871 in context.blockdescendants(fctx, fromline, toline)), |
869 in dagop.blockdescendants(fctx, fromline, toline)), |
872 iterasc=True) |
870 iterasc=True) |
873 else: |
871 else: |
874 rs = generatorset( |
872 rs = generatorset( |
875 (c.rev() for c, _linerange |
873 (c.rev() for c, _linerange |
876 in context.blockancestors(fctx, fromline, toline)), |
874 in dagop.blockancestors(fctx, fromline, toline)), |
877 iterasc=False) |
875 iterasc=False) |
878 return subset & rs |
876 return subset & rs |
879 |
877 |
880 @predicate('all()', safe=True) |
878 @predicate('all()', safe=True) |
881 def getall(repo, subset, x): |
879 def getall(repo, subset, x): |