mercurial/discovery.py
changeset 32705 70a020daf0b9
parent 32675 fc9296c15112
child 32706 993f58db2045
--- a/mercurial/discovery.py	Tue Jun 06 14:38:59 2017 -0700
+++ b/mercurial/discovery.py	Mon May 29 05:45:59 2017 +0200
@@ -331,13 +331,17 @@
     # If there are more heads after the push than before, a suitable
     # error message, depending on unsynced status, is displayed.
     errormsg = None
-    # If there is no obsstore, allfuturecommon won't be used, so no
-    # need to compute it.
+    # 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.node() for c in cctx)
         allfuturecommon.update(allmissing)
+        for branch, heads in sorted(headssum.iteritems()):
+            remoteheads, newheads, unsyncedheads = heads
+            result = _postprocessobsolete(pushop, allfuturecommon, newheads)
+            newheads = sorted(result[0])
+            headssum[branch] = (remoteheads, newheads, unsyncedheads)
     for branch, heads in sorted(headssum.iteritems()):
         remoteheads, newheads, unsyncedheads = heads
         # add unsynced data
@@ -347,9 +351,6 @@
             oldhs = set(remoteheads)
         oldhs.update(unsyncedheads)
         dhs = None # delta heads, the new heads on branch
-        if repo.obsstore:
-            result = _postprocessobsolete(pushop, allfuturecommon, newheads)
-            newheads = sorted(result[0])
         newhs = set(newheads)
         newhs.update(unsyncedheads)
         if unsyncedheads: