Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 42264:6bc1245cd598
revset: populate wdir() by its hash or revision number
It belongs to the same category as the null hash/revision, and we do handle
these virtual identifiers in id()/rev() predicates. Let's do that more
consistently.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 30 Apr 2019 15:15:57 +0900 |
parents | a0c5e06e9b1a |
children | d279e4f453c4 |
line wrap: on
line diff
--- a/mercurial/revset.py Tue Apr 30 15:10:07 2019 +0900 +++ b/mercurial/revset.py Tue Apr 30 15:15:57 2019 +0900 @@ -123,8 +123,7 @@ if not x: raise error.ParseError(_("empty string is not a valid revision")) x = scmutil.intrev(scmutil.revsymbol(repo, x)) - if (x in subset - or x == node.nullrev and isinstance(subset, fullreposet)): + if x in subset or x in _virtualrevs and isinstance(subset, fullreposet): return baseset([x]) return baseset() @@ -2265,7 +2264,7 @@ if r in seen: continue if (r in subset - or r == node.nullrev and isinstance(subset, fullreposet)): + or r in _virtualrevs and isinstance(subset, fullreposet)): ls.append(r) seen.add(r) return baseset(ls)