diff -r b746a22349f9 -r 482a6aac1f15 mercurial/revset.py --- a/mercurial/revset.py Thu Mar 19 16:06:24 2020 +0100 +++ b/mercurial/revset.py Sat Mar 21 13:27:47 2020 +0900 @@ -2108,7 +2108,8 @@ except (TypeError, ValueError): # i18n: "rev" is a keyword raise error.ParseError(_(b"rev expects a number")) - repo.changelog.node(l) # check that the rev exists + if l not in _virtualrevs: + repo.changelog.node(l) # check that the rev exists return subset & baseset([l])