Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 38526:54d7aaa243cc
revset: add partial support for ancestor(wdir())
It's easy, so let's make it happen. I'm not certain if 'wdir() &' should
be required. ancestors(wdir()) works without it, but ancestor(wdir()) doesn't
as of now. That's the issue of fullreposet.__contains__() vs __and__().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 29 Jun 2018 23:13:23 +0900 |
parents | 4455e5d4d59c |
children | 6ec996e8c9bc |
line wrap: on
line diff
--- a/mercurial/revset.py Sat Jun 23 13:19:03 2018 +0100 +++ b/mercurial/revset.py Fri Jun 29 23:13:23 2018 +0900 @@ -319,8 +319,9 @@ for r in reviter: anc = anc.ancestor(repo[r]) - if anc.rev() in subset: - return baseset([anc.rev()]) + r = scmutil.intrev(anc) + if r in subset: + return baseset([r]) return baseset() def _ancestors(repo, subset, x, followfirst=False, startdepth=None,