Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 30800:cd23879cbac7
revset: rename rev argument of followlines() to startrev
The rev argument has the same meaning as startrev of follow(), and I think
startrev is more informative.
followlines() is new function, we can make BC now.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 09 Jan 2017 16:16:26 +0900 |
parents | 0b49449a01f4 |
children | 67ee7874e53b |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Jan 13 23:48:21 2017 +0900 +++ b/mercurial/revset.py Mon Jan 09 16:16:26 2017 +0900 @@ -1066,23 +1066,23 @@ # of every revisions or files revisions. return _follow(repo, subset, x, '_followfirst', followfirst=True) -@predicate('followlines(file, fromline, toline[, rev=.])', safe=True) +@predicate('followlines(file, fromline, toline[, startrev=.])', safe=True) def followlines(repo, subset, x): """Changesets modifying `file` in line range ('fromline', 'toline'). - Line range corresponds to 'file' content at 'rev' and should hence be - consistent with file size. If rev is not specified, working directory's + Line range corresponds to 'file' content at 'startrev' and should hence be + consistent with file size. If startrev is not specified, working directory's parent is used. """ from . import context # avoid circular import issues - args = getargsdict(x, 'followlines', 'file *lines rev') + args = getargsdict(x, 'followlines', 'file *lines startrev') if len(args['lines']) != 2: raise error.ParseError(_("followlines takes at least three arguments")) rev = '.' - if 'rev' in args: - revs = getset(repo, fullreposet(repo), args['rev']) + if 'startrev' in args: + revs = getset(repo, fullreposet(repo), args['startrev']) if len(revs) != 1: raise error.ParseError( _("followlines expects exactly one revision"))