# HG changeset patch # User Yuya Nishihara # Date 1474540902 -32400 # Node ID d67bcfc0041f796e6a028cdd7d0dea3bf60f4ec7 # Parent d36eda8896ccd5157e76610275f54dd1e4599187 revset: make follow() accept empty startrev This is the same behavior as ancestors(emptyset). diff -r d36eda8896cc -r d67bcfc0041f mercurial/revset.py --- a/mercurial/revset.py Thu Sep 22 19:40:07 2016 +0900 +++ b/mercurial/revset.py Thu Sep 22 19:41:42 2016 +0900 @@ -913,9 +913,6 @@ revs = None if 'startrev' in args: revs = getset(repo, fullreposet(repo), args['startrev']) - if not revs: - raise error.RepoLookupError( - _("%s expected at least one starting revision") % name) if 'file' in args: x = getstring(args['file'], _("%s expected a pattern") % name) if revs is None: diff -r d36eda8896cc -r d67bcfc0041f tests/test-log.t --- a/tests/test-log.t Thu Sep 22 19:40:07 2016 +0900 +++ b/tests/test-log.t Thu Sep 22 19:41:42 2016 +0900 @@ -742,8 +742,6 @@ follow files starting from empty revision: $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" - abort: follow expected at least one starting revision! - [255] follow starting from revisions: