Mercurial > hg-stable
changeset 4730:eadfaa9ec487
Updated command tables in commands.py and hgext extensions.
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 26 Jun 2007 22:38:57 +0200 |
parents | 9881abfc0e44 |
children | 1d5a2ee683b0 |
files | hgext/extdiff.py hgext/fetch.py hgext/gpg.py hgext/graphlog.py hgext/hgk.py hgext/mq.py hgext/patchbomb.py mercurial/commands.py tests/test-extdiff.out |
diffstat | 9 files changed, 177 insertions(+), 154 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/extdiff.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/extdiff.py Tue Jun 26 22:38:57 2007 +0200 @@ -189,4 +189,4 @@ return mydiff cmdtable[cmd] = (save(cmd, path, diffopts), cmdtable['extdiff'][1][1:], - _('hg %s [OPT]... [FILE]...') % cmd) + _('hg %s [OPTION]... [FILE]...') % cmd)
--- a/hgext/fetch.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/fetch.py Tue Jun 26 22:38:57 2007 +0200 @@ -85,14 +85,14 @@ cmdtable = { 'fetch': - (fetch, - [('e', 'ssh', '', _('specify ssh command to use')), - ('m', 'message', '', _('use <text> as commit message')), - ('l', 'logfile', '', _('read the commit message from <file>')), - ('d', 'date', '', _('record datecode as commit date')), - ('u', 'user', '', _('record user as commiter')), - ('r', 'rev', [], _('a specific revision you would like to pull')), - ('f', 'force-editor', None, _('edit commit message')), - ('', 'remotecmd', '', _('hg command to run on the remote side'))], - 'hg fetch [SOURCE]'), - } + (fetch, + [('e', 'ssh', '', _('specify ssh command to use')), + ('m', 'message', '', _('use <text> as commit message')), + ('l', 'logfile', '', _('read the commit message from <file>')), + ('d', 'date', '', _('record datecode as commit date')), + ('u', 'user', '', _('record user as commiter')), + ('r', 'rev', [], _('a specific revision you would like to pull')), + ('f', 'force-editor', None, _('edit commit message')), + ('', 'remotecmd', '', _('hg command to run on the remote side'))], + _('hg fetch [SOURCE]')), +}
--- a/hgext/gpg.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/gpg.py Tue Jun 26 22:38:57 2007 +0200 @@ -266,14 +266,14 @@ cmdtable = { "sign": (sign, - [('l', 'local', None, _("make the signature local")), - ('f', 'force', None, _("sign even if the sigfile is modified")), - ('', 'no-commit', None, _("do not commit the sigfile after signing")), - ('m', 'message', "", _("commit message")), - ('d', 'date', "", _("date code")), - ('u', 'user', "", _("user")), - ('k', 'key', "", _("the key id to sign with"))], - _("hg sign [OPTION]... [REVISION]...")), + [('l', 'local', None, _('make the signature local')), + ('f', 'force', None, _('sign even if the sigfile is modified')), + ('', 'no-commit', None, _('do not commit the sigfile after signing')), + ('m', 'message', '', _('commit message')), + ('d', 'date', '', _('date code')), + ('u', 'user', '', _('user')), + ('k', 'key', '', _('the key id to sign with'))], + _('hg sign [OPTION]... [REVISION]...')), "sigcheck": (check, [], _('hg sigcheck REVISION')), "sigs": (sigs, [], _('hg sigs')), }
--- a/hgext/graphlog.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/graphlog.py Tue Jun 26 22:38:57 2007 +0200 @@ -255,11 +255,11 @@ cmdtable = { "glog": - (graphlog, - [("l", "limit", "", _("limit number of changes displayed")), - ("p", "patch", False, _("show patch")), - ("r", "rev", [], _("show the specified revision or range")), - ("", "style", "", _("display using template map file")), - ("", "template", "", _("display with template"))], - "hg glog [OPTIONS]"), + (graphlog, + [('l', 'limit', '', _('limit number of changes displayed')), + ('p', 'patch', False, _('show patch')), + ('r', 'rev', [], _('show the specified revision or range')), + ('', 'style', '', _('display using template map file')), + ('', 'template', '', _('display with template'))], + _('hg glog [OPTION]...')), }
--- a/hgext/hgk.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/hgk.py Tue Jun 26 22:38:57 2007 +0200 @@ -275,25 +275,34 @@ util.system(cmd) cmdtable = { - "^view": (view, - [('l', 'limit', '', 'limit number of changes displayed')], - 'hg view [-l LIMIT] [REVRANGE]'), - "debug-diff-tree": (difftree, [('p', 'patch', None, 'generate patch'), - ('r', 'recursive', None, 'recursive'), - ('P', 'pretty', None, 'pretty'), - ('s', 'stdin', None, 'stdin'), - ('C', 'copy', None, 'detect copies'), - ('S', 'search', "", 'search')], - "hg git-diff-tree [options] node1 node2 [files...]"), - "debug-cat-file": (catfile, [('s', 'stdin', None, 'stdin')], - "hg debug-cat-file [options] type file"), - "debug-merge-base": (base, [], "hg debug-merge-base node node"), - 'debug-rev-parse': (revparse, - [('', 'default', '', 'ignored')], - "hg debug-rev-parse rev"), - "debug-rev-list": (revlist, [('H', 'header', None, 'header'), - ('t', 'topo-order', None, 'topo-order'), - ('p', 'parents', None, 'parents'), - ('n', 'max-count', 0, 'max-count')], - "hg debug-rev-list [options] revs"), + "^view": + (view, + [('l', 'limit', '', 'limit number of changes displayed')], + 'hg view [-l LIMIT] [REVRANGE]'), + "debug-diff-tree": + (difftree, + [('p', 'patch', None, 'generate patch'), + ('r', 'recursive', None, 'recursive'), + ('P', 'pretty', None, 'pretty'), + ('s', 'stdin', None, 'stdin'), + ('C', 'copy', None, 'detect copies'), + ('S', 'search', "", 'search')], + 'hg git-diff-tree [OPTION]... NODE1 NODE2 [FILE]...'), + "debug-cat-file": + (catfile, + [('s', 'stdin', None, 'stdin')], + 'hg debug-cat-file [OPTION]... TYPE FILE'), + "debug-merge-base": + (base, [], 'hg debug-merge-base node node'), + "debug-rev-parse": + (revparse, + [('', 'default', '', 'ignored')], + 'hg debug-rev-parse REV'), + "debug-rev-list": + (revlist, + [('H', 'header', None, 'header'), + ('t', 'topo-order', None, 'topo-order'), + ('p', 'parents', None, 'parents'), + ('n', 'max-count', 0, 'max-count')], + 'hg debug-rev-list [options] revs'), }
--- a/hgext/mq.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/mq.py Tue Jun 26 22:38:57 2007 +0200 @@ -2080,44 +2080,49 @@ seriesopts = [('s', 'summary', None, _('print first line of patch header'))] cmdtable = { - "qapplied": (applied, [] + seriesopts, 'hg qapplied [-s] [PATCH]'), - "qclone": (clone, - [('', 'pull', None, _('use pull protocol to copy metadata')), - ('U', 'noupdate', None, _('do not update the new working directories')), - ('', 'uncompressed', None, - _('use uncompressed transfer (fast over LAN)')), - ('e', 'ssh', '', _('specify ssh command to use')), - ('p', 'patches', '', _('location of source patch repo')), - ('', 'remotecmd', '', - _('specify hg command to run on the remote side'))], - 'hg qclone [OPTION]... SOURCE [DEST]'), + "qapplied": (applied, [] + seriesopts, _('hg qapplied [-s] [PATCH]')), + "qclone": + (clone, + [('', 'pull', None, _('use pull protocol to copy metadata')), + ('U', 'noupdate', None, _('do not update the new working directories')), + ('', 'uncompressed', None, + _('use uncompressed transfer (fast over LAN)')), + ('e', 'ssh', '', _('specify ssh command to use')), + ('p', 'patches', '', _('location of source patch repo')), + ('', 'remotecmd', '', + _('specify hg command to run on the remote side'))], + _('hg qclone [OPTION]... SOURCE [DEST]')), "qcommit|qci": (commit, commands.table["^commit|ci"][1], - 'hg qcommit [OPTION]... [FILE]...'), - "^qdiff": (diff, - [('g', 'git', None, _('use git extended diff format')), - ('I', 'include', [], _('include names matching the given patterns')), - ('X', 'exclude', [], _('exclude names matching the given patterns'))], - 'hg qdiff [-I] [-X] [FILE]...'), + _('hg qcommit [OPTION]... [FILE]...')), + "^qdiff": + (diff, + [('g', 'git', None, _('use git extended diff format')), + ('I', 'include', [], _('include names matching the given patterns')), + ('X', 'exclude', [], _('exclude names matching the given patterns'))], + _('hg qdiff [-I] [-X] [-g] [FILE]...')), "qdelete|qremove|qrm": (delete, [('k', 'keep', None, _('keep patch file')), ('r', 'rev', [], _('stop managing a revision'))], - 'hg qdelete [-k] [-r REV]... PATCH...'), + _('hg qdelete [-k] [-r REV]... PATCH...')), 'qfold': (fold, [('e', 'edit', None, _('edit patch header')), - ('k', 'keep', None, _('keep folded patch files')) - ] + commands.commitopts, - 'hg qfold [-e] [-m <text>] [-l <file] PATCH...'), - 'qgoto': (goto, [('f', 'force', None, _('overwrite any local changes'))], - 'hg qgoto [OPT]... PATCH'), - 'qguard': (guard, [('l', 'list', None, _('list all patches and guards')), - ('n', 'none', None, _('drop all guards'))], - 'hg qguard [PATCH] [+GUARD]... [-GUARD]...'), - 'qheader': (header, [], - _('hg qheader [PATCH]')), + ('k', 'keep', None, _('keep folded patch files')), + ] + commands.commitopts, + _('hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH...')), + 'qgoto': + (goto, + [('f', 'force', None, _('overwrite any local changes'))], + _('hg qgoto [OPTION]... PATCH')), + 'qguard': + (guard, + [('l', 'list', None, _('list all patches and guards')), + ('n', 'none', None, _('drop all guards'))], + _('hg qguard [-l] [-n] [PATCH] [+GUARD]... [-GUARD]...')), + 'qheader': (header, [], _('hg qheader [PATCH]')), "^qimport": (qimport, [('e', 'existing', None, 'import file in patch dir'), @@ -2125,75 +2130,76 @@ ('f', 'force', None, 'overwrite existing files'), ('r', 'rev', [], 'place existing revisions under mq control'), ('g', 'git', None, _('use git extended diff format'))], - 'hg qimport [-e] [-n NAME] [-f] [-g] [-r REV]... FILE...'), + _('hg qimport [-e] [-n NAME] [-f] [-g] [-r REV]... FILE...')), "^qinit": (init, [('c', 'create-repo', None, 'create queue repository')], - 'hg qinit [-c]'), + _('hg qinit [-c]')), "qnew": (new, [('e', 'edit', None, _('edit commit message')), ('f', 'force', None, _('import uncommitted changes into patch')), ('I', 'include', [], _('include names matching the given patterns')), - ('X', 'exclude', [], _('exclude names matching the given patterns')) + ('X', 'exclude', [], _('exclude names matching the given patterns')), ] + commands.commitopts, - 'hg qnew [-e] [-m TEXT] [-l FILE] [-f] PATCH [FILE]...'), - "qnext": (next, [] + seriesopts, 'hg qnext [-s]'), - "qprev": (prev, [] + seriesopts, 'hg qprev [-s]'), + _('hg qnew [-e] [-m TEXT] [-l FILE] [-f] PATCH [FILE]...')), + "qnext": (next, [] + seriesopts, _('hg qnext [-s]')), + "qprev": (prev, [] + seriesopts, _('hg qprev [-s]')), "^qpop": (pop, - [('a', 'all', None, 'pop all patches'), - ('n', 'name', '', 'queue name to pop'), - ('f', 'force', None, 'forget any local changes')], - 'hg qpop [-a] [-n NAME] [-f] [PATCH | INDEX]'), + [('a', 'all', None, _('pop all patches')), + ('n', 'name', '', _('queue name to pop')), + ('f', 'force', None, _('forget any local changes'))], + _('hg qpop [-a] [-n NAME] [-f] [PATCH | INDEX]')), "^qpush": (push, - [('f', 'force', None, 'apply if the patch has rejects'), - ('l', 'list', None, 'list patch name in commit text'), - ('a', 'all', None, 'apply all patches'), - ('m', 'merge', None, 'merge from another queue'), - ('n', 'name', '', 'merge queue name')], - 'hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]'), + [('f', 'force', None, _('apply if the patch has rejects')), + ('l', 'list', None, _('list patch name in commit text')), + ('a', 'all', None, _('apply all patches')), + ('m', 'merge', None, _('merge from another queue')), + ('n', 'name', '', _('merge queue name'))], + _('hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]')), "^qrefresh": (refresh, [('e', 'edit', None, _('edit commit message')), ('g', 'git', None, _('use git extended diff format')), - ('s', 'short', None, 'refresh only files already in the patch'), + ('s', 'short', None, _('refresh only files already in the patch')), ('I', 'include', [], _('include names matching the given patterns')), - ('X', 'exclude', [], _('exclude names matching the given patterns')) + ('X', 'exclude', [], _('exclude names matching the given patterns')), ] + commands.commitopts, - 'hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...'), + _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...')), 'qrename|qmv': - (rename, [], 'hg qrename PATCH1 [PATCH2]'), + (rename, [], _('hg qrename PATCH1 [PATCH2]')), "qrestore": (restore, - [('d', 'delete', None, 'delete save entry'), - ('u', 'update', None, 'update queue working dir')], - 'hg qrestore [-d] [-u] REV'), + [('d', 'delete', None, _('delete save entry')), + ('u', 'update', None, _('update queue working dir'))], + _('hg qrestore [-d] [-u] REV')), "qsave": (save, - [('c', 'copy', None, 'copy patch directory'), - ('n', 'name', '', 'copy directory name'), - ('e', 'empty', None, 'clear queue status file'), - ('f', 'force', None, 'force copy')] + commands.commitopts, - 'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'), - "qselect": (select, - [('n', 'none', None, _('disable all guards')), - ('s', 'series', None, _('list all guards in series file')), - ('', 'pop', None, - _('pop to before first guarded applied patch')), - ('', 'reapply', None, _('pop, then reapply patches'))], - 'hg qselect [OPTION]... [GUARD]...'), + [('c', 'copy', None, _('copy patch directory')), + ('n', 'name', '', _('copy directory name')), + ('e', 'empty', None, _('clear queue status file')), + ('f', 'force', None, _('force copy'))] + commands.commitopts, + _('hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]')), + "qselect": + (select, + [('n', 'none', None, _('disable all guards')), + ('s', 'series', None, _('list all guards in series file')), + ('', 'pop', None, _('pop to before first guarded applied patch')), + ('', 'reapply', None, _('pop, then reapply patches'))], + _('hg qselect [OPTION]... [GUARD]...')), "qseries": (series, - [('m', 'missing', None, 'print patches not in series')] + seriesopts, - 'hg qseries [-ms]'), + [('m', 'missing', None, _('print patches not in series')), + ] + seriesopts, + _('hg qseries [-ms]')), "^strip": (strip, - [('f', 'force', None, 'force multi-head removal'), - ('b', 'backup', None, 'bundle unrelated changesets'), - ('n', 'nobackup', None, 'no backups')], - 'hg strip [-f] [-b] [-n] REV'), - "qtop": (top, [] + seriesopts, 'hg qtop [-s]'), - "qunapplied": (unapplied, [] + seriesopts, 'hg qunapplied [-s] [PATCH]'), + [('f', 'force', None, _('force multi-head removal')), + ('b', 'backup', None, _('bundle unrelated changesets')), + ('n', 'nobackup', None, _('no backups'))], + _('hg strip [-f] [-b] [-n] REV')), + "qtop": (top, [] + seriesopts, _('hg qtop [-s]')), + "qunapplied": (unapplied, [] + seriesopts, _('hg qunapplied [-s] [PATCH]')), }
--- a/hgext/patchbomb.py Tue Jun 26 20:37:15 2007 +0200 +++ b/hgext/patchbomb.py Tue Jun 26 22:38:57 2007 +0200 @@ -410,26 +410,31 @@ mailer.sendmail(sender, to + bcc + cc, m.as_string(0)) cmdtable = { - 'email': - (patchbomb, - [('a', 'attach', None, 'send patches as inline attachments'), - ('', 'bcc', [], 'email addresses of blind copy recipients'), - ('c', 'cc', [], 'email addresses of copy recipients'), - ('d', 'diffstat', None, 'add diffstat output to messages'), - ('', 'date', '', _('use the given date as the sending date')), - ('g', 'git', None, _('use git extended diff format')), - ('f', 'from', '', 'email address of sender'), - ('', 'plain', None, 'omit hg patch header'), - ('n', 'test', None, 'print messages that would be sent'), - ('m', 'mbox', '', 'write messages to mbox file instead of sending them'), - ('o', 'outgoing', None, _('send changes not found in the target repository')), - ('b', 'bundle', None, _('send changes not in target as a binary bundle')), - ('r', 'rev', [], _('a revision to send')), - ('s', 'subject', '', 'subject of first message (intro or single patch)'), - ('t', 'to', [], 'email addresses of recipients'), - ('', 'force', None, _('run even when remote repository is unrelated (with -b)')), - ('', 'base', [], - _('a base changeset to specify instead of a destination (with -b)'))] - + commands.remoteopts, - "hg email [OPTION]... [DEST]...") - } + "email": + (patchbomb, + [('a', 'attach', None, _('send patches as inline attachments')), + ('', 'bcc', [], _('email addresses of blind copy recipients')), + ('c', 'cc', [], _('email addresses of copy recipients')), + ('d', 'diffstat', None, _('add diffstat output to messages')), + ('', 'date', '', _('use the given date as the sending date')), + ('g', 'git', None, _('use git extended diff format')), + ('f', 'from', '', _('email address of sender')), + ('', 'plain', None, _('omit hg patch header')), + ('n', 'test', None, _('print messages that would be sent')), + ('m', 'mbox', '', + _('write messages to mbox file instead of sending them')), + ('o', 'outgoing', None, + _('send changes not found in the target repository')), + ('b', 'bundle', None, + _('send changes not in target as a binary bundle')), + ('r', 'rev', [], _('a revision to send')), + ('s', 'subject', '', + _('subject of first message (intro or single patch)')), + ('t', 'to', [], _('email addresses of recipients')), + ('', 'force', None, + _('run even when remote repository is unrelated (with -b)')), + ('', 'base', [], + _('a base changeset to specify instead of a destination (with -b)')), + ] + commands.remoteopts, + _('hg email [OPTION]... [DEST]...')) +}
--- a/mercurial/commands.py Tue Jun 26 20:37:15 2007 +0200 +++ b/mercurial/commands.py Tue Jun 26 22:38:57 2007 +0200 @@ -2768,14 +2768,16 @@ ('r', 'rev', '', _('revision to backout')), ] + walkopts + commitopts, _('hg backout [OPTION]... [-r] REV')), - "branch": (branch, - [('f', 'force', None, - _('set branch name even if it shadows an existing branch'))], - _('hg branch [NAME]')), - "branches": (branches, - [('a', 'active', False, - _("show only branches that have unmerged heads"))], - _('hg branches [-a]')), + "branch": + (branch, + [('f', 'force', None, + _('set branch name even if it shadows an existing branch'))], + _('hg branch [NAME]')), + "branches": + (branches, + [('a', 'active', False, + _('show only branches that have unmerged heads'))], + _('hg branches [-a]')), "bundle": (bundle, [('f', 'force', None, @@ -2837,9 +2839,10 @@ "debugdata": (debugdata, [], _('debugdata FILE REV')), "debugindex": (debugindex, [], _('debugindex FILE')), "debugindexdot": (debugindexdot, [], _('debugindexdot FILE')), - "debugrename": (debugrename, - [('r', 'rev', '', _('revision to debug'))], - _('debugrename [-r REV] FILE')), + "debugrename": + (debugrename, + [('r', 'rev', '', _('revision to debug'))], + _('debugrename [-r REV] FILE')), "debugwalk": (debugwalk, walkopts, _('debugwalk [OPTION]... [FILE]...')), "^diff": (diff,
--- a/tests/test-extdiff.out Tue Jun 26 20:37:15 2007 +0200 +++ b/tests/test-extdiff.out Tue Jun 26 22:38:57 2007 +0200 @@ -5,7 +5,7 @@ making snapshot of 0 files from rev 000000000000 making snapshot of 1 files from working dir diffing a.000000000000 a -hg falabala [OPT]... [FILE]... +hg falabala [OPTION]... [FILE]... use 'echo' to diff repository (or selected files)