mercurial/discovery.py
changeset 32792 4374e88e808c
parent 32791 1cb14923dee9
child 35184 bc775b8cc020
--- a/mercurial/discovery.py	Mon Jun 05 13:37:04 2017 +0100
+++ b/mercurial/discovery.py	Mon Jun 05 13:44:15 2017 +0100
@@ -248,11 +248,10 @@
 
     # If there are no obsstore, no post processing are needed.
     if repo.obsstore:
-        allmissing = set(outgoing.missing)
-        cctx = repo.set('%ld', outgoing.common)
-        allfuturecommon = set(c.rev() for c in cctx)
         torev = repo.changelog.rev
-        allfuturecommon.update(torev(m) for m in allmissing)
+        futureheads = set(torev(h) for h in outgoing.missingheads)
+        futureheads |= set(torev(h) for h in outgoing.commonheads)
+        allfuturecommon = repo.changelog.ancestors(futureheads, inclusive=True)
         for branch, heads in sorted(headssum.iteritems()):
             remoteheads, newheads, unsyncedheads, placeholder = heads
             result = _postprocessobsolete(pushop, allfuturecommon, newheads)