# HG changeset patch # User Marcin Kasperski # Date 1446968726 -3600 # Node ID 1ea915867337978f427543f48d622dad656c881a # Parent b1d440f1027a0fef4d5c6202abfc905f787dbeec Standard push options are imported from mercurial, not copied here. Functional effect it is now possible to specify: --ssh, --remotecmd, and --insecure which were not handled previously. Extension will also handle new push opts in future (would they happen) diff -r b1d440f1027a -r 1ea915867337 allpaths.py --- a/allpaths.py Sun Nov 08 08:29:14 2015 +0100 +++ b/allpaths.py Sun Nov 08 08:45:26 2015 +0100 @@ -7,11 +7,11 @@ import mercurial.util import mercurial.commands +import mercurial.cmdutil from mercurial.i18n import _ #pylint:disable=invalid-name,broad-except,line-too-long - def pushall(ui, repo, **opts): """execute a push command on multiple paths""" # Extract our options and filter them out @@ -33,17 +33,18 @@ ui.warn(_('error pushing to %s: %s') % (path[1], e)) +def _original_options(cmdname): + """Gets list of given command options as specified in Mercurial core""" + _, spec = mercurial.cmdutil.findcmd(cmdname, mercurial.commands.table) + return spec[1] + + cmdtable = { "pushall": ( pushall, [ ('g', 'group', 'paths', _('use a named group of paths')), ('', 'ignore-errors', None, _('continue execution despite errors')), - ('f', 'force', None, _('force push')), - ('r', 'rev', [], _('a changeset intended to be included in the destination'), _('REV')), - ('B', 'bookmark', [], _('bookmark to push'), _('BOOKMARK')), - ('b', 'branch', [], _('a specific branch you would like to push'), _('BRANCH')), - ('', 'new-branch', False, _('allow pushing a new branch')) - ], - _('[-g GROUP] [--ignore-errors] ')) + ] + _original_options('push'), + _('[-g GROUP] [--ignore-errors] ')), }