Show More
@@ -992,6 +992,21 b' def overrideforget(orig, ui, repo, *pats' | |||
|
992 | 992 | |
|
993 | 993 | return result |
|
994 | 994 | |
|
995 | def _getoutgoings(repo, missing, addfunc): | |
|
996 | """get pairs of filename and largefile hash in outgoing revisions | |
|
997 | in 'missing'. | |
|
998 | ||
|
999 | 'addfunc' is invoked with each unique pairs of filename and | |
|
1000 | largefile hash value. | |
|
1001 | """ | |
|
1002 | knowns = set() | |
|
1003 | def dedup(fn, lfhash): | |
|
1004 | k = (fn, lfhash) | |
|
1005 | if k not in knowns: | |
|
1006 | knowns.add(k) | |
|
1007 | addfunc(fn, lfhash) | |
|
1008 | lfutil.getlfilestoupload(repo, missing, dedup) | |
|
1009 | ||
|
995 | 1010 | def outgoinghook(ui, repo, other, opts, missing): |
|
996 | 1011 | if opts.pop('large', None): |
|
997 | 1012 | toupload = set() |
@@ -1020,14 +1035,19 b' def summaryremotehook(ui, repo, opts, ch' | |||
|
1020 | 1035 | return |
|
1021 | 1036 | |
|
1022 | 1037 | toupload = set() |
|
1023 | lfutil.getlfilestoupload(repo, outgoing.missing, | |
|
1024 | lambda fn, lfhash: toupload.add(fn)) | |
|
1038 | lfhashes = set() | |
|
1039 | def addfunc(fn, lfhash): | |
|
1040 | toupload.add(fn) | |
|
1041 | lfhashes.add(lfhash) | |
|
1042 | _getoutgoings(repo, outgoing.missing, addfunc) | |
|
1043 | ||
|
1025 | 1044 | if not toupload: |
|
1026 | 1045 | # i18n: column positioning for "hg summary" |
|
1027 | 1046 | ui.status(_('largefiles: (no files to upload)\n')) |
|
1028 | 1047 | else: |
|
1029 | 1048 | # i18n: column positioning for "hg summary" |
|
1030 |
ui.status(_('largefiles: %d to upload\n') |
|
|
1049 | ui.status(_('largefiles: %d entities for %d files to upload\n') | |
|
1050 | % (len(lfhashes), len(toupload))) | |
|
1031 | 1051 | |
|
1032 | 1052 | def overridesummary(orig, ui, repo, *pats, **opts): |
|
1033 | 1053 | try: |
@@ -468,7 +468,7 b' check messages when there are files to u' | |||
|
468 | 468 | branch: default |
|
469 | 469 | commit: (clean) |
|
470 | 470 | update: (current) |
|
471 | largefiles: 1 to upload | |
|
471 | largefiles: 1 entities for 1 files to upload | |
|
472 | 472 | $ hg -R clone2 outgoing --large |
|
473 | 473 | comparing with $TESTTMP/issue3651/src (glob) |
|
474 | 474 | searching for changes |
@@ -503,7 +503,7 b' check messages when there are files to u' | |||
|
503 | 503 | branch: default |
|
504 | 504 | commit: (clean) |
|
505 | 505 | update: (current) |
|
506 | largefiles: 3 to upload | |
|
506 | largefiles: 1 entities for 3 files to upload | |
|
507 | 507 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
508 | 508 | comparing with $TESTTMP/issue3651/src (glob) |
|
509 | 509 | searching for changes |
@@ -533,7 +533,7 b' check messages when there are files to u' | |||
|
533 | 533 | branch: default |
|
534 | 534 | commit: (clean) |
|
535 | 535 | update: (current) |
|
536 | largefiles: 3 to upload | |
|
536 | largefiles: 3 entities for 3 files to upload | |
|
537 | 537 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
538 | 538 | comparing with $TESTTMP/issue3651/src (glob) |
|
539 | 539 | searching for changes |
General Comments 0
You need to be logged in to leave comments.
Login now