Mercurial > hg-stable
changeset 32479:018f638ad88e
revset: add support for using ~ operator on wdir() predicate
We catch the WdirUnsupported exception and handles the wdir() case here.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 23 May 2017 01:08:19 +0530 |
parents | c8fb2a82b5f9 |
children | 4dd292cec3ad |
files | mercurial/revset.py tests/test-revset.t |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Mon May 22 02:14:22 2017 +0530 +++ b/mercurial/revset.py Tue May 23 01:08:19 2017 +0530 @@ -383,7 +383,10 @@ cl = repo.changelog for r in getset(repo, fullreposet(repo), x): for i in range(n): - r = cl.parentrevs(r)[0] + try: + r = cl.parentrevs(r)[0] + except error.WdirUnsupported: + r = repo[r].parents()[0].rev() ps.add(r) return subset & ps