Show More
@@ -992,6 +992,21 b' def overrideforget(orig, ui, repo, *pats' | |||||
992 |
|
992 | |||
993 | return result |
|
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 | def outgoinghook(ui, repo, other, opts, missing): |
|
1010 | def outgoinghook(ui, repo, other, opts, missing): | |
996 | if opts.pop('large', None): |
|
1011 | if opts.pop('large', None): | |
997 | toupload = set() |
|
1012 | toupload = set() | |
@@ -1020,14 +1035,19 b' def summaryremotehook(ui, repo, opts, ch' | |||||
1020 | return |
|
1035 | return | |
1021 |
|
1036 | |||
1022 | toupload = set() |
|
1037 | toupload = set() | |
1023 | lfutil.getlfilestoupload(repo, outgoing.missing, |
|
1038 | lfhashes = set() | |
1024 | lambda fn, lfhash: toupload.add(fn)) |
|
1039 | def addfunc(fn, lfhash): | |
|
1040 | toupload.add(fn) | |||
|
1041 | lfhashes.add(lfhash) | |||
|
1042 | _getoutgoings(repo, outgoing.missing, addfunc) | |||
|
1043 | ||||
1025 | if not toupload: |
|
1044 | if not toupload: | |
1026 | # i18n: column positioning for "hg summary" |
|
1045 | # i18n: column positioning for "hg summary" | |
1027 | ui.status(_('largefiles: (no files to upload)\n')) |
|
1046 | ui.status(_('largefiles: (no files to upload)\n')) | |
1028 | else: |
|
1047 | else: | |
1029 | # i18n: column positioning for "hg summary" |
|
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 | def overridesummary(orig, ui, repo, *pats, **opts): |
|
1052 | def overridesummary(orig, ui, repo, *pats, **opts): | |
1033 | try: |
|
1053 | try: |
@@ -468,7 +468,7 b' check messages when there are files to u' | |||||
468 | branch: default |
|
468 | branch: default | |
469 | commit: (clean) |
|
469 | commit: (clean) | |
470 | update: (current) |
|
470 | update: (current) | |
471 | largefiles: 1 to upload |
|
471 | largefiles: 1 entities for 1 files to upload | |
472 | $ hg -R clone2 outgoing --large |
|
472 | $ hg -R clone2 outgoing --large | |
473 | comparing with $TESTTMP/issue3651/src (glob) |
|
473 | comparing with $TESTTMP/issue3651/src (glob) | |
474 | searching for changes |
|
474 | searching for changes | |
@@ -503,7 +503,7 b' check messages when there are files to u' | |||||
503 | branch: default |
|
503 | branch: default | |
504 | commit: (clean) |
|
504 | commit: (clean) | |
505 | update: (current) |
|
505 | update: (current) | |
506 | largefiles: 3 to upload |
|
506 | largefiles: 1 entities for 3 files to upload | |
507 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
507 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
508 | comparing with $TESTTMP/issue3651/src (glob) |
|
508 | comparing with $TESTTMP/issue3651/src (glob) | |
509 | searching for changes |
|
509 | searching for changes | |
@@ -533,7 +533,7 b' check messages when there are files to u' | |||||
533 | branch: default |
|
533 | branch: default | |
534 | commit: (clean) |
|
534 | commit: (clean) | |
535 | update: (current) |
|
535 | update: (current) | |
536 | largefiles: 3 to upload |
|
536 | largefiles: 3 entities for 3 files to upload | |
537 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
537 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
538 | comparing with $TESTTMP/issue3651/src (glob) |
|
538 | comparing with $TESTTMP/issue3651/src (glob) | |
539 | searching for changes |
|
539 | searching for changes |
General Comments 0
You need to be logged in to leave comments.
Login now