diff -r 624d6683c705 -r 662ffdde5adf mercurial/revset.py --- a/mercurial/revset.py Mon Mar 18 18:59:38 2019 +0300 +++ b/mercurial/revset.py Mon Mar 18 19:01:29 2019 +0300 @@ -1240,7 +1240,7 @@ getargs(x, 0, 0, _("head takes no arguments")) hs = set() cl = repo.changelog - for ls in repo.branchmap().itervalues(): + for ls in repo.branchmap().iterheads(): hs.update(cl.rev(h) for h in ls) return subset & baseset(hs)