Show More
@@ -1005,23 +1005,19 b' def getoutgoinglfiles(ui, repo, dest=Non' | |||
|
1005 | 1005 | lfutil.getlfilestoupload(repo, o, lambda fn, lfhash: toupload.add(fn)) |
|
1006 | 1006 | return sorted(toupload) |
|
1007 | 1007 | |
|
1008 |
def |
|
|
1009 | result = orig(ui, repo, dest, **opts) | |
|
1010 | ||
|
1008 | def outgoinghook(ui, repo, other, opts, missing): | |
|
1011 | 1009 | if opts.pop('large', None): |
|
1012 | toupload = getoutgoinglfiles(ui, repo, dest, **opts) | |
|
1013 | if toupload is None: | |
|
1014 | ui.status(_('largefiles: No remote repo\n')) | |
|
1015 |
|
|
|
1010 | toupload = set() | |
|
1011 | lfutil.getlfilestoupload(repo, missing, | |
|
1012 | lambda fn, lfhash: toupload.add(fn)) | |
|
1013 | if not toupload: | |
|
1016 | 1014 | ui.status(_('largefiles: no files to upload\n')) |
|
1017 | 1015 | else: |
|
1018 | 1016 | ui.status(_('largefiles to upload:\n')) |
|
1019 | for file in toupload: | |
|
1017 | for file in sorted(toupload): | |
|
1020 | 1018 | ui.status(lfutil.splitstandin(file) + '\n') |
|
1021 | 1019 | ui.status('\n') |
|
1022 | 1020 | |
|
1023 | return result | |
|
1024 | ||
|
1025 | 1021 | def summaryremotehook(ui, repo, opts, changes): |
|
1026 | 1022 | largeopt = opts.get('large', False) |
|
1027 | 1023 | if changes is None: |
@@ -65,10 +65,11 b' def uisetup(ui):' | |||
|
65 | 65 | debugstateopt = [('', 'large', None, _('display largefiles dirstate'))] |
|
66 | 66 | entry[1].extend(debugstateopt) |
|
67 | 67 | |
|
68 | entry = extensions.wrapcommand(commands.table, 'outgoing', | |
|
69 | overrides.overrideoutgoing) | |
|
68 | outgoing = lambda orgfunc, *arg, **kwargs: orgfunc(*arg, **kwargs) | |
|
69 | entry = extensions.wrapcommand(commands.table, 'outgoing', outgoing) | |
|
70 | 70 | outgoingopt = [('', 'large', None, _('display outgoing largefiles'))] |
|
71 | 71 | entry[1].extend(outgoingopt) |
|
72 | cmdutil.outgoinghooks.add('largefiles', overrides.outgoinghook) | |
|
72 | 73 | entry = extensions.wrapcommand(commands.table, 'summary', |
|
73 | 74 | overrides.overridesummary) |
|
74 | 75 | summaryopt = [('', 'large', None, _('display outgoing largefiles'))] |
@@ -703,7 +703,6 b' Test that outgoing --large works (with r' | |||
|
703 | 703 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
704 | 704 | summary: this used to not notice the rm |
|
705 | 705 | |
|
706 | searching for changes | |
|
707 | 706 | largefiles to upload: |
|
708 | 707 | foo |
|
709 | 708 | large |
@@ -2154,10 +2153,15 b' check messages when there is no files to' | |||
|
2154 | 2153 | comparing with $TESTTMP/issue3651/src (glob) |
|
2155 | 2154 | searching for changes |
|
2156 | 2155 | no changes found |
|
2157 | searching for changes | |
|
2158 | 2156 | largefiles: no files to upload |
|
2159 | 2157 | [1] |
|
2160 | 2158 | |
|
2159 | $ hg -R clone2 outgoing --large --graph --template "{rev}" | |
|
2160 | comparing with $TESTTMP/issue3651/src (glob) | |
|
2161 | searching for changes | |
|
2162 | no changes found | |
|
2163 | largefiles: no files to upload | |
|
2164 | ||
|
2161 | 2165 | check messages when there are files to upload: |
|
2162 | 2166 | |
|
2163 | 2167 | $ echo b > clone2/b |
@@ -2181,7 +2185,14 b' check messages when there are files to u' | |||
|
2181 | 2185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2182 | 2186 | summary: #1 |
|
2183 | 2187 | |
|
2188 | largefiles to upload: | |
|
2189 | b | |
|
2190 | ||
|
2191 | $ hg -R clone2 outgoing --large --graph --template "{rev}" | |
|
2192 | comparing with $TESTTMP/issue3651/src | |
|
2184 | 2193 | searching for changes |
|
2194 | @ 1 | |
|
2195 | ||
|
2185 | 2196 | largefiles to upload: |
|
2186 | 2197 | b |
|
2187 | 2198 |
General Comments 0
You need to be logged in to leave comments.
Login now