##// END OF EJS Templates
discovery: don't report all "unsynced" remote heads (issue4230)...
Mads Kiilerich -
r21198:56a04085 stable
parent child Browse files
Show More
@@ -313,7 +313,11 b' def checkheads(repo, remote, outgoing, r'
313 newhs = candidate_newhs
313 newhs = candidate_newhs
314 unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
314 unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
315 if unsynced:
315 if unsynced:
316 heads = ' '.join(short(h) for h in unsynced)
316 if len(unsynced) <= 4 or repo.ui.verbose:
317 heads = ' '.join(short(h) for h in unsynced)
318 else:
319 heads = (' '.join(short(h) for h in unsynced[:4]) +
320 ' ' + _("and %s others") % (len(unsynced) - 4))
317 if branch is None:
321 if branch is None:
318 repo.ui.status(_("remote has heads that are "
322 repo.ui.status(_("remote has heads that are "
319 "not known locally: %s\n") % heads)
323 "not known locally: %s\n") % heads)
@@ -378,7 +378,7 b' Pushing multi headed new branch:'
378 added 3 changesets with 3 changes to 1 files (+1 heads)
378 added 3 changesets with 3 changes to 1 files (+1 heads)
379
379
380 Checking prepush logic does not allow silently pushing
380 Checking prepush logic does not allow silently pushing
381 multiple new heads:
381 multiple new heads but also doesn't report too many heads:
382
382
383 $ cd ..
383 $ cd ..
384 $ hg init h
384 $ hg init h
@@ -404,10 +404,29 b' multiple new heads:'
404 adding c
404 adding c
405 created new head
405 created new head
406
406
407 $ for i in `seq 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done
408
407 $ hg -R i push h
409 $ hg -R i push h
408 pushing to h
410 pushing to h
409 searching for changes
411 searching for changes
410 remote has heads on branch 'default' that are not known locally: ce4212fc8847
412 remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
413 abort: push creates new remote head 97bd0c84d346!
414 (pull and merge or see "hg help push" for details about pushing new heads)
415 [255]
416 $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx
417 $ hg -R i push h
418 pushing to h
419 searching for changes
420 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others
421 abort: push creates new remote head 97bd0c84d346!
422 (pull and merge or see "hg help push" for details about pushing new heads)
423 [255]
424 $ hg -R i push h -v
425 pushing to h
426 searching for changes
427 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
428 new remote heads on branch 'default':
429 97bd0c84d346
411 abort: push creates new remote head 97bd0c84d346!
430 abort: push creates new remote head 97bd0c84d346!
412 (pull and merge or see "hg help push" for details about pushing new heads)
431 (pull and merge or see "hg help push" for details about pushing new heads)
413 [255]
432 [255]
General Comments 0
You need to be logged in to leave comments. Login now