mercurial/discovery.py
changeset 32705 70a020daf0b9
parent 32675 fc9296c15112
child 32706 993f58db2045
equal deleted inserted replaced
32704:1270b00a385d 32705:70a020daf0b9
   329 
   329 
   330     # 3. Check for new heads.
   330     # 3. Check for new heads.
   331     # If there are more heads after the push than before, a suitable
   331     # If there are more heads after the push than before, a suitable
   332     # error message, depending on unsynced status, is displayed.
   332     # error message, depending on unsynced status, is displayed.
   333     errormsg = None
   333     errormsg = None
   334     # If there is no obsstore, allfuturecommon won't be used, so no
   334     # If there are no obsstore, no post-processing are needed.
   335     # need to compute it.
       
   336     if repo.obsstore:
   335     if repo.obsstore:
   337         allmissing = set(outgoing.missing)
   336         allmissing = set(outgoing.missing)
   338         cctx = repo.set('%ld', outgoing.common)
   337         cctx = repo.set('%ld', outgoing.common)
   339         allfuturecommon = set(c.node() for c in cctx)
   338         allfuturecommon = set(c.node() for c in cctx)
   340         allfuturecommon.update(allmissing)
   339         allfuturecommon.update(allmissing)
       
   340         for branch, heads in sorted(headssum.iteritems()):
       
   341             remoteheads, newheads, unsyncedheads = heads
       
   342             result = _postprocessobsolete(pushop, allfuturecommon, newheads)
       
   343             newheads = sorted(result[0])
       
   344             headssum[branch] = (remoteheads, newheads, unsyncedheads)
   341     for branch, heads in sorted(headssum.iteritems()):
   345     for branch, heads in sorted(headssum.iteritems()):
   342         remoteheads, newheads, unsyncedheads = heads
   346         remoteheads, newheads, unsyncedheads = heads
   343         # add unsynced data
   347         # add unsynced data
   344         if remoteheads is None:
   348         if remoteheads is None:
   345             oldhs = set()
   349             oldhs = set()
   346         else:
   350         else:
   347             oldhs = set(remoteheads)
   351             oldhs = set(remoteheads)
   348         oldhs.update(unsyncedheads)
   352         oldhs.update(unsyncedheads)
   349         dhs = None # delta heads, the new heads on branch
   353         dhs = None # delta heads, the new heads on branch
   350         if repo.obsstore:
       
   351             result = _postprocessobsolete(pushop, allfuturecommon, newheads)
       
   352             newheads = sorted(result[0])
       
   353         newhs = set(newheads)
   354         newhs = set(newheads)
   354         newhs.update(unsyncedheads)
   355         newhs.update(unsyncedheads)
   355         if unsyncedheads:
   356         if unsyncedheads:
   356             if None in unsyncedheads:
   357             if None in unsyncedheads:
   357                 # old remote, no heads data
   358                 # old remote, no heads data