diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -555,7 +555,7 @@ def unbundle(repo, proto, heads): their_heads = decodelist(heads) def check_heads(): - heads = repo.heads() + heads = phases.visibleheads(repo) heads_hash = util.sha1(''.join(sorted(heads))).digest() return (their_heads == ['force'] or their_heads == heads or their_heads == ['hashed', heads_hash])