Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 35310:d67bcfc0041f
revset: make follow() accept empty startrev
This is the same behavior as ancestors(emptyset).
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Sep 2016 19:41:42 +0900 |
parents | d36eda8896cc |
children | 0c1aff6d73a7 |
comparison
equal
deleted
inserted
replaced
35309:d36eda8896cc | 35310:d67bcfc0041f |
---|---|
911 def _follow(repo, subset, x, name, followfirst=False): | 911 def _follow(repo, subset, x, name, followfirst=False): |
912 args = getargsdict(x, name, 'file startrev') | 912 args = getargsdict(x, name, 'file startrev') |
913 revs = None | 913 revs = None |
914 if 'startrev' in args: | 914 if 'startrev' in args: |
915 revs = getset(repo, fullreposet(repo), args['startrev']) | 915 revs = getset(repo, fullreposet(repo), args['startrev']) |
916 if not revs: | |
917 raise error.RepoLookupError( | |
918 _("%s expected at least one starting revision") % name) | |
919 if 'file' in args: | 916 if 'file' in args: |
920 x = getstring(args['file'], _("%s expected a pattern") % name) | 917 x = getstring(args['file'], _("%s expected a pattern") % name) |
921 if revs is None: | 918 if revs is None: |
922 revs = [None] | 919 revs = [None] |
923 fctxs = [] | 920 fctxs = [] |