Comments
Patch
@@ -336,23 +336,11 @@ def checkheads(repo, remote, outgoing, r
if unsynced:
repo.ui.warn(_("note: unsynced remote changes!\n"))
def visibleheads(repo):
"""return the set of visible head of this repo"""
- # XXX we want a cache on this
- sroots = repo._phasecache.phaseroots[phases.secret]
- if sroots or repo.obsstore:
- # XXX very slow revset. storing heads or secret "boundary"
- # would help.
- revset = repo.set('heads(not (%ln:: + extinct()))', sroots)
-
- vheads = [ctx.node() for ctx in revset]
- if not vheads:
- vheads.append(nullid)
- else:
- vheads = repo.heads()
- return vheads
+ return repo.filtered('unserved').heads()
def visiblebranchmap(repo):
"""return a branchmap for the visible set"""
return repo.filtered('unserved').branchmap()
@@ -89,11 +89,11 @@ check that mercurial refuse to push
$ hg init ../other
$ hg push ../other
pushing to ../other
searching for changes
- abort: push includes divergent changeset: 82623d38b9ba!
+ abort: push includes divergent changeset: 392fd25390da!
[255]
$ cd ..
@@ -174,10 +174,11 @@ the public changeset
And that we can't push bumped changeset
$ hg push ../tmpa -r 0 --force #(make repo related)
pushing to ../tmpa
searching for changes
+ warning: repository is unrelated
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
$ hg push ../tmpa