Mercurial > hg
diff hgext/largefiles/uisetup.py @ 28878:a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
The default of pushing all largefiles referenced in outgoing revisions is safe,
but also expensive and sometimes not what is needed. We thus introduce a
--lfrev option, similar to what pull already has.
By specifying an empty set of revisions (or null), it is possible to get lazy
(and insecure!) pushes of revisions without referenced largefiles, similar to
how pull works.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 27 Mar 2016 13:00:28 -0700 |
parents | dcb4209bd30d |
children | 2143266ecb65 |
line wrap: on
line diff
--- a/hgext/largefiles/uisetup.py Wed Apr 13 01:45:45 2016 +0200 +++ b/hgext/largefiles/uisetup.py Sun Mar 27 13:00:28 2016 -0700 @@ -9,7 +9,7 @@ '''setup for largefiles extension: uisetup''' from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \ - httppeer, merge, scmutil, sshpeer, wireproto, subrepo, copies + httppeer, merge, scmutil, sshpeer, wireproto, subrepo, copies, exchange from mercurial.i18n import _ from mercurial.hgweb import hgweb_mod, webcommands @@ -84,6 +84,14 @@ _('download largefiles for these revisions'), _('REV'))] entry[1].extend(pullopt) + entry = extensions.wrapcommand(commands.table, 'push', + overrides.overridepush) + pushopt = [('', 'lfrev', [], + _('upload largefiles for these revisions'), _('REV'))] + entry[1].extend(pushopt) + entry = extensions.wrapfunction(exchange, 'pushoperation', + overrides.exchangepushoperation) + entry = extensions.wrapcommand(commands.table, 'clone', overrides.overrideclone) cloneopt = [('', 'all-largefiles', None,