author | Matt Mackall <mpm@selenic.com> |
Sun, 20 Nov 2011 15:29:55 -0600 | |
branch | stable |
changeset 15532 | 5edaf47cd462 |
parent 15531 | 0810ccc51f0a |
child 15533 | 10a4fab20ed9 |
--- 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))