# HG changeset patch # User Benoit Boissinot # Date 1159552746 -7200 # Node ID 37b53487c341004e4f35b3755db164ce02433b59 # Parent a73a785ea8e1624a57c2e9479345b5cd2a953127 factor opts: remote repo access options diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2675,6 +2675,11 @@ globalopts = [ dryrunopts = [('n', 'dry-run', None, _('do not perform actions, just print output'))] +remoteopts = [ + ('e', 'ssh', '', _('specify ssh command to use')), + ('', 'remotecmd', '', _('specify hg command to run on the remote side')), +] + walkopts = [ ('I', 'include', [], _('include names matching the given patterns')), ('X', 'exclude', [], _('exclude names matching the given patterns')), @@ -2741,9 +2746,7 @@ table = { ('', 'pull', None, _('use pull protocol to copy metadata')), ('', 'uncompressed', None, _('use uncompressed transfer (fast over LAN)')), - ('e', 'ssh', '', _('specify ssh command to use')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], + ] + remoteopts, _('hg clone [OPTION]... SOURCE [DEST]')), "^commit|ci": (commit, @@ -2848,17 +2851,11 @@ table = { ('p', 'patch', None, _('show patch')), ('r', 'rev', [], _('a specific revision up to which you would like to pull')), ('', 'template', '', _('display with template')), - ('e', 'ssh', '', _('specify ssh command to use')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], + ] + remoteopts, _('hg incoming [-p] [-n] [-M] [-r REV]...' ' [--bundle FILENAME] [SOURCE]')), "^init": - (init, - [('e', 'ssh', '', _('specify ssh command to use')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], - _('hg init [-e FILE] [--remotecmd FILE] [DEST]')), + (init, remoteopts, _('hg init [-e FILE] [--remotecmd FILE] [DEST]')), "locate": (locate, [('r', 'rev', '', _('search the repository as it stood at rev')), @@ -2901,9 +2898,7 @@ table = { ('r', 'rev', [], _('a specific revision you would like to push')), ('n', 'newest-first', None, _('show newest record first')), ('', 'template', '', _('display with template')), - ('e', 'ssh', '', _('specify ssh command to use')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], + ] + remoteopts, _('hg outgoing [-M] [-p] [-n] [-r REV]... [DEST]')), "^parents": (parents, @@ -2917,20 +2912,16 @@ table = { (pull, [('u', 'update', None, _('update the working directory to tip after pull')), - ('e', 'ssh', '', _('specify ssh command to use')), ('f', 'force', None, _('run even when remote repository is unrelated')), ('r', 'rev', [], _('a specific revision up to which you would like to pull')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], + ] + remoteopts, _('hg pull [-u] [-r REV]... [-e FILE] [--remotecmd FILE] [SOURCE]')), "^push": (push, [('f', 'force', None, _('force push')), - ('e', 'ssh', '', _('specify ssh command to use')), ('r', 'rev', [], _('a specific revision you would like to push')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], + ] + remoteopts, _('hg push [-f] [-r REV]... [-e FILE] [--remotecmd FILE] [DEST]')), "debugrawcommit|rawcommit": (rawcommit,