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 " | |||
|
319 | "not known locally: %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")) |
|
@@ -22,6 +22,7 b'' | |||||
22 | $ hg push ../a |
|
22 | $ hg push ../a | |
23 | pushing to ../a |
|
23 | pushing to ../a | |
24 | searching for changes |
|
24 | searching for changes | |
|
25 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |||
25 | abort: push creates new remote head 1e108cc5548c! |
|
26 | abort: push creates new remote head 1e108cc5548c! | |
26 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
27 | (pull and merge or see "hg help push" for details about pushing new heads) | |
27 | [255] |
|
28 | [255] | |
@@ -35,6 +36,7 b'' | |||||
35 | query 2; still undecided: 1, sample size is: 1 |
|
36 | query 2; still undecided: 1, sample size is: 1 | |
36 | 2 total queries |
|
37 | 2 total queries | |
37 | listing keys for "bookmarks" |
|
38 | listing keys for "bookmarks" | |
|
39 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |||
38 | new remote heads on branch 'default': |
|
40 | new remote heads on branch 'default': | |
39 | 1e108cc5548c |
|
41 | 1e108cc5548c | |
40 | abort: push creates new remote head 1e108cc5548c! |
|
42 | abort: push creates new remote head 1e108cc5548c! | |
@@ -405,6 +407,7 b' multiple new heads:' | |||||
405 | $ hg -R i push h |
|
407 | $ hg -R i push h | |
406 | pushing to h |
|
408 | pushing to h | |
407 | searching for changes |
|
409 | searching for changes | |
|
410 | remote has heads on branch 'default' that are not known locally: ce4212fc8847 | |||
408 | abort: push creates new remote head 97bd0c84d346! |
|
411 | abort: push creates new remote head 97bd0c84d346! | |
409 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
412 | (pull and merge or see "hg help push" for details about pushing new heads) | |
410 | [255] |
|
413 | [255] |
@@ -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