equal
deleted
inserted
replaced
262 # If there are more heads after the push than before, a suitable |
262 # If there are more heads after the push than before, a suitable |
263 # error message, depending on unsynced status, is displayed. |
263 # error message, depending on unsynced status, is displayed. |
264 error = None |
264 error = None |
265 unsynced = False |
265 unsynced = False |
266 allmissing = set(outgoing.missing) |
266 allmissing = set(outgoing.missing) |
|
267 allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common)) |
|
268 allfuturecommon.update(allmissing) |
267 for branch, heads in headssum.iteritems(): |
269 for branch, heads in headssum.iteritems(): |
268 if heads[0] is None: |
270 if heads[0] is None: |
269 # Maybe we should abort if we push more that one head |
271 # Maybe we should abort if we push more that one head |
270 # for new branches ? |
272 # for new branches ? |
271 continue |
273 continue |
291 # |
293 # |
292 # This two case will be easy to handle for know changeset but much |
294 # This two case will be easy to handle for know changeset but much |
293 # more tricky for unsynced changes. |
295 # more tricky for unsynced changes. |
294 newhs = set() |
296 newhs = set() |
295 for nh in candidate_newhs: |
297 for nh in candidate_newhs: |
296 if repo[nh].phase() <= phases.public: |
298 if nh in repo and repo[nh].phase() <= phases.public: |
297 newhs.add(nh) |
299 newhs.add(nh) |
298 else: |
300 else: |
299 for suc in obsolete.anysuccessors(repo.obsstore, nh): |
301 for suc in obsolete.anysuccessors(repo.obsstore, nh): |
300 if suc != nh and suc in allmissing: |
302 if suc != nh and suc in allfuturecommon: |
301 break |
303 break |
302 else: |
304 else: |
303 newhs.add(nh) |
305 newhs.add(nh) |
304 else: |
306 else: |
305 newhs = candidate_newhs |
307 newhs = candidate_newhs |