diff -r 7546bf46bfcd -r 0bd730fbcc2b mercurial/revset.py --- a/mercurial/revset.py Mon Mar 18 19:11:55 2019 +0300 +++ b/mercurial/revset.py Mon Mar 18 19:31:45 2019 +0300 @@ -555,7 +555,7 @@ if kind == 'literal': # note: falls through to the revspec case if no branch with # this name exists and pattern kind is not specified explicitly - if pattern in repo.branchmap(): + if repo.branchmap().hasbranch(pattern): return subset.filter(lambda r: matcher(getbranch(r)), condrepr=('', b)) if b.startswith('literal:'):