Show More
@@ -268,7 +268,6 b' def checkheads(repo, remote, outgoing, r' | |||||
268 | # If there are more heads after the push than before, a suitable |
|
268 | # If there are more heads after the push than before, a suitable | |
269 | # error message, depending on unsynced status, is displayed. |
|
269 | # error message, depending on unsynced status, is displayed. | |
270 | error = None |
|
270 | error = None | |
271 | unsynced = False |
|
|||
272 | allmissing = set(outgoing.missing) |
|
271 | allmissing = set(outgoing.missing) | |
273 | allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common)) |
|
272 | allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common)) | |
274 | allfuturecommon.update(allmissing) |
|
273 | allfuturecommon.update(allmissing) | |
@@ -312,8 +311,15 b' def checkheads(repo, remote, outgoing, r' | |||||
312 | newhs.add(nh) |
|
311 | newhs.add(nh) | |
313 | else: |
|
312 | else: | |
314 | newhs = candidate_newhs |
|
313 | newhs = candidate_newhs | |
315 |
|
|
314 | unsynced = sorted(h for h in unsyncedheads if h not in discardedheads) | |
316 |
|
|
315 | if unsynced: | |
|
316 | heads = ' '.join(short(h) for h in unsynced) | |||
|
317 | if branch is None: | |||
|
318 | repo.ui.warn(_("remote has heads that are not known locally: " | |||
|
319 | "%s\n") % heads) | |||
|
320 | else: | |||
|
321 | repo.ui.warn(_("remote has heads on branch '%s' that are " | |||
|
322 | "not known locally: %s\n") % (branch, heads)) | |||
317 | if remoteheads is None: |
|
323 | if remoteheads is None: | |
318 | if len(newhs) > 1: |
|
324 | if len(newhs) > 1: | |
319 | dhs = list(newhs) |
|
325 | dhs = list(newhs) | |
@@ -350,7 +356,3 b' def checkheads(repo, remote, outgoing, r' | |||||
350 | repo.ui.note((" %s\n") % short(h)) |
|
356 | repo.ui.note((" %s\n") % short(h)) | |
351 | if error: |
|
357 | if error: | |
352 | raise util.Abort(error, hint=hint) |
|
358 | raise util.Abort(error, hint=hint) | |
353 |
|
||||
354 | # 6. Check for unsynced changes on involved branches. |
|
|||
355 | if unsynced: |
|
|||
356 | repo.ui.warn(_("note: unsynced remote changes!\n")) |
|
@@ -223,7 +223,7 b' push should succeed even though it has a' | |||||
223 | $ hg push |
|
223 | $ hg push | |
224 | pushing to ssh://user@dummy/remote |
|
224 | pushing to ssh://user@dummy/remote | |
225 | searching for changes |
|
225 | searching for changes | |
226 | note: unsynced remote changes! |
|
226 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
227 | remote: adding changesets |
|
227 | remote: adding changesets | |
228 | remote: adding manifests |
|
228 | remote: adding manifests | |
229 | remote: adding file changes |
|
229 | remote: adding file changes |
General Comments 0
You need to be logged in to leave comments.
Login now