diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -168,10 +168,7 @@ def checkheads(repo, remote, outgoing, r branches = set(repo[n].branch() for n in outgoing.missing) # 2. Check for new branches on the remote. - if remote.local(): - remotemap = phases.visiblebranchmap(remote.local()) - else: - remotemap = remote.branchmap() + remotemap = remote.branchmap() newbranches = branches - set(remotemap) if newbranches and not newbranch: # new branch requires --new-branch branchnames = ', '.join(sorted(newbranches)) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -56,10 +56,10 @@ class localpeer(peer.peerrepository): return self._repo.lookup(key) def branchmap(self): - return self._repo.branchmap() + return phases.visiblebranchmap(self._repo) def heads(self): - return self._repo.heads() + return phases.visibleheads(self._repo) def known(self, nodes): return self._repo.known(nodes) diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -9,7 +9,6 @@ from node import nullid from i18n import _ import random, util, dagutil -import phases def _updatesample(dag, nodes, sample, always, quicksamplesize=0): # if nodes is empty we scan the entire graph @@ -100,7 +99,7 @@ def findcommonheads(ui, local, remote, sample = ownheads if remote.local(): # stopgap until we have a proper localpeer that supports batch() - srvheadhashes = phases.visibleheads(remote.local()) + srvheadhashes = remote.heads() yesno = remote.known(dag.externalizeall(sample)) elif remote.capable('batch'): batch = remote.batch()