@@ -1001,23 +1001,17 @@
return sorted(lfutil.getlfilestoupload(repo, o))
-def overrideoutgoing(orig, ui, repo, dest=None, **opts):
- result = orig(ui, repo, dest, **opts)
-
+def outgoinghook(ui, repo, opts, missing):
if opts.pop('large', None):
- toupload = getoutgoinglfiles(ui, repo, dest, **opts)
- if toupload is None:
- ui.status(_('largefiles: No remote repo\n'))
- elif not toupload:
+ toupload = lfutil.getlfilestoupload(repo, missing)
+ if not toupload:
ui.status(_('largefiles: no files to upload\n'))
else:
ui.status(_('largefiles to upload:\n'))
- for file in toupload:
+ for file in sorted(toupload):
ui.status(lfutil.splitstandin(file) + '\n')
ui.status('\n')
- return result
-
def summaryremotehook(ui, repo, opts, changes):
largeopt = opts.get('large', False)
if changes is None:
@@ -65,10 +65,11 @@
debugstateopt = [('', 'large', None, _('display largefiles dirstate'))]
entry[1].extend(debugstateopt)
- entry = extensions.wrapcommand(commands.table, 'outgoing',
- overrides.overrideoutgoing)
+ outgoing = lambda orgfunc, *arg, **kwargs: orgfunc(*arg, **kwargs)
+ entry = extensions.wrapcommand(commands.table, 'outgoing', outgoing)
outgoingopt = [('', 'large', None, _('display outgoing largefiles'))]
entry[1].extend(outgoingopt)
+ cmdutil.outgoinghooks.add('largefiles', overrides.outgoinghook)
entry = extensions.wrapcommand(commands.table, 'summary',
overrides.overridesummary)
summaryopt = [('', 'large', None, _('display outgoing largefiles'))]
@@ -703,7 +703,6 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: this used to not notice the rm
- searching for changes
largefiles to upload:
foo
large
@@ -2154,7 +2153,6 @@
comparing with $TESTTMP/issue3651/src (glob)
searching for changes
no changes found
- searching for changes
largefiles: no files to upload
[1]
@@ -2181,7 +2179,6 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: #1
- searching for changes
largefiles to upload:
b