##// END OF EJS Templates
push: backout 2bc520bd0ce0 due to test failures
Matt Mackall -
r20403:47f25736 default
parent child Browse files
Show More
@@ -268,6 +268,7 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
271 allmissing = set(outgoing.missing)
272 allmissing = set(outgoing.missing)
272 allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common))
273 allfuturecommon = set(c.node() for c in repo.set('%ld', outgoing.common))
273 allfuturecommon.update(allmissing)
274 allfuturecommon.update(allmissing)
@@ -311,15 +312,8 b' def checkheads(repo, remote, outgoing, r'
311 newhs.add(nh)
312 newhs.add(nh)
312 else:
313 else:
313 newhs = candidate_newhs
314 newhs = candidate_newhs
314 unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
315 if [h for h in unsyncedheads if h not in discardedheads]:
315 if unsynced:
316 unsynced = True
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))
323 if remoteheads is None:
317 if remoteheads is None:
324 if len(newhs) > 1:
318 if len(newhs) > 1:
325 dhs = list(newhs)
319 dhs = list(newhs)
@@ -356,3 +350,7 b' def checkheads(repo, remote, outgoing, r'
356 repo.ui.note((" %s\n") % short(h))
350 repo.ui.note((" %s\n") % short(h))
357 if error:
351 if error:
358 raise util.Abort(error, hint=hint)
352 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 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
226 note: unsynced remote changes!
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