Mercurial > hg
changeset 15532:5edaf47cd462 stable
revset: follow(nosuchfile) should give an empty set (issue3114)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 20 Nov 2011 15:29:55 -0600 |
parents | 0810ccc51f0a |
children | 10a4fab20ed9 |
files | mercurial/revset.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Nov 11 11:11:11 2011 +1111 +++ b/mercurial/revset.py Sun Nov 20 15:29:55 2011 -0600 @@ -434,7 +434,10 @@ p = repo['.'].rev() if l: x = getstring(l[0], _("follow expected a filename")) - s = set(ctx.rev() for ctx in repo['.'][x].ancestors()) + if x in repo['.']: + s = set(ctx.rev() for ctx in repo['.'][x].ancestors()) + else: + return [] else: s = set(repo.changelog.ancestors(p))