Mercurial > hg
diff mercurial/revset.py @ 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 | 8ae2900d6d9b |
children | a585d78e7b2f |
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))