Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 7364:ad7f736f3214
help: remove redundant 'hg <command>' from command synopses
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 12 Nov 2008 19:11:09 -0600 |
parents | 9fe97eea5510 |
children | 87158be081b8 |
comparison
equal
deleted
inserted
replaced
7363:9d28ff207030 | 7364:ad7f736f3214 |
---|---|
1308 select = lambda c: c.lstrip('^').startswith(inst.args[0]) | 1308 select = lambda c: c.lstrip('^').startswith(inst.args[0]) |
1309 helplist(_('list of commands:\n\n'), select) | 1309 helplist(_('list of commands:\n\n'), select) |
1310 return | 1310 return |
1311 | 1311 |
1312 # synopsis | 1312 # synopsis |
1313 ui.write("%s\n" % i[2]) | 1313 if len(i) > 2: |
1314 if i[2].startswith('hg'): | |
1315 ui.write("%s\n" % i[2]) | |
1316 else: | |
1317 ui.write('hg %s %s\n' % (aliases[0], i[2])) | |
1318 else: | |
1319 ui.write('hg %s\n' % aliases[0]) | |
1314 | 1320 |
1315 # aliases | 1321 # aliases |
1316 if not ui.quiet and len(aliases) > 1: | 1322 if not ui.quiet and len(aliases) > 1: |
1317 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) | 1323 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) |
1318 | 1324 |
2997 _('ignore changes whose lines are all blank')), | 3003 _('ignore changes whose lines are all blank')), |
2998 ('U', 'unified', '', _('number of lines of context to show')) | 3004 ('U', 'unified', '', _('number of lines of context to show')) |
2999 ] | 3005 ] |
3000 | 3006 |
3001 table = { | 3007 table = { |
3002 "^add": (add, walkopts + dryrunopts, _('hg add [OPTION]... [FILE]...')), | 3008 "^add": (add, walkopts + dryrunopts, _('[OPTION]... [FILE]...')), |
3003 "addremove": | 3009 "addremove": |
3004 (addremove, | 3010 (addremove, |
3005 [('s', 'similarity', '', | 3011 [('s', 'similarity', '', |
3006 _('guess renamed files by similarity (0<=s<=100)')), | 3012 _('guess renamed files by similarity (0<=s<=100)')), |
3007 ] + walkopts + dryrunopts, | 3013 ] + walkopts + dryrunopts, |
3008 _('hg addremove [OPTION]... [FILE]...')), | 3014 _('[OPTION]... [FILE]...')), |
3009 "^annotate|blame": | 3015 "^annotate|blame": |
3010 (annotate, | 3016 (annotate, |
3011 [('r', 'rev', '', _('annotate the specified revision')), | 3017 [('r', 'rev', '', _('annotate the specified revision')), |
3012 ('f', 'follow', None, _('follow file copies and renames')), | 3018 ('f', 'follow', None, _('follow file copies and renames')), |
3013 ('a', 'text', None, _('treat all files as text')), | 3019 ('a', 'text', None, _('treat all files as text')), |
3016 ('n', 'number', None, _('list the revision number (default)')), | 3022 ('n', 'number', None, _('list the revision number (default)')), |
3017 ('c', 'changeset', None, _('list the changeset')), | 3023 ('c', 'changeset', None, _('list the changeset')), |
3018 ('l', 'line-number', None, | 3024 ('l', 'line-number', None, |
3019 _('show line number at the first appearance')) | 3025 _('show line number at the first appearance')) |
3020 ] + walkopts, | 3026 ] + walkopts, |
3021 _('hg annotate [-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...')), | 3027 _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...')), |
3022 "archive": | 3028 "archive": |
3023 (archive, | 3029 (archive, |
3024 [('', 'no-decode', None, _('do not pass files through decoders')), | 3030 [('', 'no-decode', None, _('do not pass files through decoders')), |
3025 ('p', 'prefix', '', _('directory prefix for files in archive')), | 3031 ('p', 'prefix', '', _('directory prefix for files in archive')), |
3026 ('r', 'rev', '', _('revision to distribute')), | 3032 ('r', 'rev', '', _('revision to distribute')), |
3027 ('t', 'type', '', _('type of distribution to create')), | 3033 ('t', 'type', '', _('type of distribution to create')), |
3028 ] + walkopts, | 3034 ] + walkopts, |
3029 _('hg archive [OPTION]... DEST')), | 3035 _('[OPTION]... DEST')), |
3030 "backout": | 3036 "backout": |
3031 (backout, | 3037 (backout, |
3032 [('', 'merge', None, | 3038 [('', 'merge', None, |
3033 _('merge with old dirstate parent after backout')), | 3039 _('merge with old dirstate parent after backout')), |
3034 ('', 'parent', '', _('parent to choose when backing out merge')), | 3040 ('', 'parent', '', _('parent to choose when backing out merge')), |
3035 ('r', 'rev', '', _('revision to backout')), | 3041 ('r', 'rev', '', _('revision to backout')), |
3036 ] + walkopts + commitopts + commitopts2, | 3042 ] + walkopts + commitopts + commitopts2, |
3037 _('hg backout [OPTION]... [-r] REV')), | 3043 _('[OPTION]... [-r] REV')), |
3038 "bisect": | 3044 "bisect": |
3039 (bisect, | 3045 (bisect, |
3040 [('r', 'reset', False, _('reset bisect state')), | 3046 [('r', 'reset', False, _('reset bisect state')), |
3041 ('g', 'good', False, _('mark changeset good')), | 3047 ('g', 'good', False, _('mark changeset good')), |
3042 ('b', 'bad', False, _('mark changeset bad')), | 3048 ('b', 'bad', False, _('mark changeset bad')), |
3043 ('s', 'skip', False, _('skip testing changeset')), | 3049 ('s', 'skip', False, _('skip testing changeset')), |
3044 ('c', 'command', '', _('Use command to check changeset state')), | 3050 ('c', 'command', '', _('Use command to check changeset state')), |
3045 ('U', 'noupdate', False, _('do not update to target'))], | 3051 ('U', 'noupdate', False, _('do not update to target'))], |
3046 _("hg bisect [-gbsr] [-c CMD] [REV]")), | 3052 _("[-gbsr] [-c CMD] [REV]")), |
3047 "branch": | 3053 "branch": |
3048 (branch, | 3054 (branch, |
3049 [('f', 'force', None, | 3055 [('f', 'force', None, |
3050 _('set branch name even if it shadows an existing branch')), | 3056 _('set branch name even if it shadows an existing branch')), |
3051 ('C', 'clean', None, _('reset branch name to parent branch name'))], | 3057 ('C', 'clean', None, _('reset branch name to parent branch name'))], |
3052 _('hg branch [-fC] [NAME]')), | 3058 _('[-fC] [NAME]')), |
3053 "branches": | 3059 "branches": |
3054 (branches, | 3060 (branches, |
3055 [('a', 'active', False, | 3061 [('a', 'active', False, |
3056 _('show only branches that have unmerged heads'))], | 3062 _('show only branches that have unmerged heads'))], |
3057 _('hg branches [-a]')), | 3063 _('[-a]')), |
3058 "bundle": | 3064 "bundle": |
3059 (bundle, | 3065 (bundle, |
3060 [('f', 'force', None, | 3066 [('f', 'force', None, |
3061 _('run even when remote repository is unrelated')), | 3067 _('run even when remote repository is unrelated')), |
3062 ('r', 'rev', [], | 3068 ('r', 'rev', [], |
3064 ('', 'base', [], | 3070 ('', 'base', [], |
3065 _('a base changeset to specify instead of a destination')), | 3071 _('a base changeset to specify instead of a destination')), |
3066 ('a', 'all', None, _('bundle all changesets in the repository')), | 3072 ('a', 'all', None, _('bundle all changesets in the repository')), |
3067 ('t', 'type', 'bzip2', _('bundle compression type to use')), | 3073 ('t', 'type', 'bzip2', _('bundle compression type to use')), |
3068 ] + remoteopts, | 3074 ] + remoteopts, |
3069 _('hg bundle [-f] [-a] [-r REV]... [--base REV]... FILE [DEST]')), | 3075 _('[-f] [-a] [-r REV]... [--base REV]... FILE [DEST]')), |
3070 "cat": | 3076 "cat": |
3071 (cat, | 3077 (cat, |
3072 [('o', 'output', '', _('print output to file with formatted name')), | 3078 [('o', 'output', '', _('print output to file with formatted name')), |
3073 ('r', 'rev', '', _('print the given revision')), | 3079 ('r', 'rev', '', _('print the given revision')), |
3074 ('', 'decode', None, _('apply any matching decode filter')), | 3080 ('', 'decode', None, _('apply any matching decode filter')), |
3075 ] + walkopts, | 3081 ] + walkopts, |
3076 _('hg cat [OPTION]... FILE...')), | 3082 _('[OPTION]... FILE...')), |
3077 "^clone": | 3083 "^clone": |
3078 (clone, | 3084 (clone, |
3079 [('U', 'noupdate', None, | 3085 [('U', 'noupdate', None, |
3080 _('the clone will only contain a repository (no working copy)')), | 3086 _('the clone will only contain a repository (no working copy)')), |
3081 ('r', 'rev', [], | 3087 ('r', 'rev', [], |
3082 _('a changeset you would like to have after cloning')), | 3088 _('a changeset you would like to have after cloning')), |
3083 ('', 'pull', None, _('use pull protocol to copy metadata')), | 3089 ('', 'pull', None, _('use pull protocol to copy metadata')), |
3084 ('', 'uncompressed', None, | 3090 ('', 'uncompressed', None, |
3085 _('use uncompressed transfer (fast over LAN)')), | 3091 _('use uncompressed transfer (fast over LAN)')), |
3086 ] + remoteopts, | 3092 ] + remoteopts, |
3087 _('hg clone [OPTION]... SOURCE [DEST]')), | 3093 _('[OPTION]... SOURCE [DEST]')), |
3088 "^commit|ci": | 3094 "^commit|ci": |
3089 (commit, | 3095 (commit, |
3090 [('A', 'addremove', None, | 3096 [('A', 'addremove', None, |
3091 _('mark new/missing files as added/removed before committing')), | 3097 _('mark new/missing files as added/removed before committing')), |
3092 ] + walkopts + commitopts + commitopts2, | 3098 ] + walkopts + commitopts + commitopts2, |
3093 _('hg commit [OPTION]... [FILE]...')), | 3099 _('[OPTION]... [FILE]...')), |
3094 "copy|cp": | 3100 "copy|cp": |
3095 (copy, | 3101 (copy, |
3096 [('A', 'after', None, _('record a copy that has already occurred')), | 3102 [('A', 'after', None, _('record a copy that has already occurred')), |
3097 ('f', 'force', None, | 3103 ('f', 'force', None, |
3098 _('forcibly copy over an existing managed file')), | 3104 _('forcibly copy over an existing managed file')), |
3099 ] + walkopts + dryrunopts, | 3105 ] + walkopts + dryrunopts, |
3100 _('hg copy [OPTION]... [SOURCE]... DEST')), | 3106 _('[OPTION]... [SOURCE]... DEST')), |
3101 "debugancestor": (debugancestor, [], | 3107 "debugancestor": (debugancestor, [], _('[INDEX] REV1 REV2')), |
3102 _('hg debugancestor [INDEX] REV1 REV2')), | 3108 "debugcheckstate": (debugcheckstate, []), |
3103 "debugcheckstate": (debugcheckstate, [], _('hg debugcheckstate')), | |
3104 "debugcomplete": | 3109 "debugcomplete": |
3105 (debugcomplete, | 3110 (debugcomplete, |
3106 [('o', 'options', None, _('show the command options'))], | 3111 [('o', 'options', None, _('show the command options'))], |
3107 _('hg debugcomplete [-o] CMD')), | 3112 _('[-o] CMD')), |
3108 "debugdate": | 3113 "debugdate": |
3109 (debugdate, | 3114 (debugdate, |
3110 [('e', 'extended', None, _('try extended date formats'))], | 3115 [('e', 'extended', None, _('try extended date formats'))], |
3111 _('hg debugdate [-e] DATE [RANGE]')), | 3116 _('[-e] DATE [RANGE]')), |
3112 "debugdata": (debugdata, [], _('hg debugdata FILE REV')), | 3117 "debugdata": (debugdata, [], _('FILE REV')), |
3113 "debugfsinfo": (debugfsinfo, [], _('hg debugfsinfo [PATH]')), | 3118 "debugfsinfo": (debugfsinfo, [], _('[PATH]')), |
3114 "debugindex": (debugindex, [], _('hg debugindex FILE')), | 3119 "debugindex": (debugindex, [], _('FILE')), |
3115 "debugindexdot": (debugindexdot, [], _('hg debugindexdot FILE')), | 3120 "debugindexdot": (debugindexdot, [], _('FILE')), |
3116 "debuginstall": (debuginstall, [], _('hg debuginstall')), | 3121 "debuginstall": (debuginstall, []), |
3117 "debugrawcommit|rawcommit": | 3122 "debugrawcommit|rawcommit": |
3118 (rawcommit, | 3123 (rawcommit, |
3119 [('p', 'parent', [], _('parent')), | 3124 [('p', 'parent', [], _('parent')), |
3120 ('F', 'files', '', _('file list')) | 3125 ('F', 'files', '', _('file list')) |
3121 ] + commitopts + commitopts2, | 3126 ] + commitopts + commitopts2, |
3122 _('hg debugrawcommit [OPTION]... [FILE]...')), | 3127 _('[OPTION]... [FILE]...')), |
3123 "debugrebuildstate": | 3128 "debugrebuildstate": |
3124 (debugrebuildstate, | 3129 (debugrebuildstate, |
3125 [('r', 'rev', '', _('revision to rebuild to'))], | 3130 [('r', 'rev', '', _('revision to rebuild to'))], |
3126 _('hg debugrebuildstate [-r REV] [REV]')), | 3131 _('[-r REV] [REV]')), |
3127 "debugrename": | 3132 "debugrename": |
3128 (debugrename, | 3133 (debugrename, |
3129 [('r', 'rev', '', _('revision to debug'))], | 3134 [('r', 'rev', '', _('revision to debug'))], |
3130 _('hg debugrename [-r REV] FILE')), | 3135 _('[-r REV] FILE')), |
3131 "debugsetparents": | 3136 "debugsetparents": |
3132 (debugsetparents, | 3137 (debugsetparents, [], _('REV1 [REV2]')), |
3133 [], | |
3134 _('hg debugsetparents REV1 [REV2]')), | |
3135 "debugstate": | 3138 "debugstate": |
3136 (debugstate, | 3139 (debugstate, |
3137 [('', 'nodates', None, _('do not display the saved mtime'))], | 3140 [('', 'nodates', None, _('do not display the saved mtime'))], |
3138 _('hg debugstate [OPTION]...')), | 3141 _('[OPTION]...')), |
3139 "debugwalk": (debugwalk, walkopts, _('hg debugwalk [OPTION]... [FILE]...')), | 3142 "debugwalk": (debugwalk, walkopts, _('[OPTION]... [FILE]...')), |
3140 "^diff": | 3143 "^diff": |
3141 (diff, | 3144 (diff, |
3142 [('r', 'rev', [], _('revision')) | 3145 [('r', 'rev', [], _('revision')) |
3143 ] + diffopts + diffopts2 + walkopts, | 3146 ] + diffopts + diffopts2 + walkopts, |
3144 _('hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]...')), | 3147 _('[OPTION]... [-r REV1 [-r REV2]] [FILE]...')), |
3145 "^export": | 3148 "^export": |
3146 (export, | 3149 (export, |
3147 [('o', 'output', '', _('print output to file with formatted name')), | 3150 [('o', 'output', '', _('print output to file with formatted name')), |
3148 ('', 'switch-parent', None, _('diff against the second parent')) | 3151 ('', 'switch-parent', None, _('diff against the second parent')) |
3149 ] + diffopts, | 3152 ] + diffopts, |
3150 _('hg export [OPTION]... [-o OUTFILESPEC] REV...')), | 3153 _('[OPTION]... [-o OUTFILESPEC] REV...')), |
3151 "grep": | 3154 "grep": |
3152 (grep, | 3155 (grep, |
3153 [('0', 'print0', None, _('end fields with NUL')), | 3156 [('0', 'print0', None, _('end fields with NUL')), |
3154 ('', 'all', None, _('print all revisions that match')), | 3157 ('', 'all', None, _('print all revisions that match')), |
3155 ('f', 'follow', None, | 3158 ('f', 'follow', None, |
3160 ('n', 'line-number', None, _('print matching line numbers')), | 3163 ('n', 'line-number', None, _('print matching line numbers')), |
3161 ('r', 'rev', [], _('search in given revision range')), | 3164 ('r', 'rev', [], _('search in given revision range')), |
3162 ('u', 'user', None, _('list the author (long with -v)')), | 3165 ('u', 'user', None, _('list the author (long with -v)')), |
3163 ('d', 'date', None, _('list the date (short with -q)')), | 3166 ('d', 'date', None, _('list the date (short with -q)')), |
3164 ] + walkopts, | 3167 ] + walkopts, |
3165 _('hg grep [OPTION]... PATTERN [FILE]...')), | 3168 _('[OPTION]... PATTERN [FILE]...')), |
3166 "heads": | 3169 "heads": |
3167 (heads, | 3170 (heads, |
3168 [('r', 'rev', '', _('show only heads which are descendants of rev')), | 3171 [('r', 'rev', '', _('show only heads which are descendants of rev')), |
3169 ] + templateopts, | 3172 ] + templateopts, |
3170 _('hg heads [-r REV] [REV]...')), | 3173 _('[-r REV] [REV]...')), |
3171 "help": (help_, [], _('hg help [TOPIC]')), | 3174 "help": (help_, [], _('[TOPIC]')), |
3172 "identify|id": | 3175 "identify|id": |
3173 (identify, | 3176 (identify, |
3174 [('r', 'rev', '', _('identify the specified rev')), | 3177 [('r', 'rev', '', _('identify the specified rev')), |
3175 ('n', 'num', None, _('show local revision number')), | 3178 ('n', 'num', None, _('show local revision number')), |
3176 ('i', 'id', None, _('show global revision id')), | 3179 ('i', 'id', None, _('show global revision id')), |
3177 ('b', 'branch', None, _('show branch')), | 3180 ('b', 'branch', None, _('show branch')), |
3178 ('t', 'tags', None, _('show tags'))], | 3181 ('t', 'tags', None, _('show tags'))], |
3179 _('hg identify [-nibt] [-r REV] [SOURCE]')), | 3182 _('[-nibt] [-r REV] [SOURCE]')), |
3180 "import|patch": | 3183 "import|patch": |
3181 (import_, | 3184 (import_, |
3182 [('p', 'strip', 1, | 3185 [('p', 'strip', 1, |
3183 _('directory strip option for patch. This has the same\n' | 3186 _('directory strip option for patch. This has the same\n' |
3184 'meaning as the corresponding patch option')), | 3187 'meaning as the corresponding patch option')), |
3189 ('', 'exact', None, | 3192 ('', 'exact', None, |
3190 _('apply patch to the nodes from which it was generated')), | 3193 _('apply patch to the nodes from which it was generated')), |
3191 ('', 'import-branch', None, | 3194 ('', 'import-branch', None, |
3192 _('Use any branch information in patch (implied by --exact)'))] + | 3195 _('Use any branch information in patch (implied by --exact)'))] + |
3193 commitopts + commitopts2, | 3196 commitopts + commitopts2, |
3194 _('hg import [OPTION]... PATCH...')), | 3197 _('[OPTION]... PATCH...')), |
3195 "incoming|in": | 3198 "incoming|in": |
3196 (incoming, | 3199 (incoming, |
3197 [('f', 'force', None, | 3200 [('f', 'force', None, |
3198 _('run even when remote repository is unrelated')), | 3201 _('run even when remote repository is unrelated')), |
3199 ('n', 'newest-first', None, _('show newest record first')), | 3202 ('n', 'newest-first', None, _('show newest record first')), |
3200 ('', 'bundle', '', _('file to store the bundles into')), | 3203 ('', 'bundle', '', _('file to store the bundles into')), |
3201 ('r', 'rev', [], | 3204 ('r', 'rev', [], |
3202 _('a specific revision up to which you would like to pull')), | 3205 _('a specific revision up to which you would like to pull')), |
3203 ] + logopts + remoteopts, | 3206 ] + logopts + remoteopts, |
3204 _('hg incoming [-p] [-n] [-M] [-f] [-r REV]...' | 3207 _('[-p] [-n] [-M] [-f] [-r REV]...' |
3205 ' [--bundle FILENAME] [SOURCE]')), | 3208 ' [--bundle FILENAME] [SOURCE]')), |
3206 "^init": | 3209 "^init": |
3207 (init, | 3210 (init, |
3208 remoteopts, | 3211 remoteopts, |
3209 _('hg init [-e CMD] [--remotecmd CMD] [DEST]')), | 3212 _('[-e CMD] [--remotecmd CMD] [DEST]')), |
3210 "locate": | 3213 "locate": |
3211 (locate, | 3214 (locate, |
3212 [('r', 'rev', '', _('search the repository as it stood at rev')), | 3215 [('r', 'rev', '', _('search the repository as it stood at rev')), |
3213 ('0', 'print0', None, | 3216 ('0', 'print0', None, |
3214 _('end filenames with NUL, for use with xargs')), | 3217 _('end filenames with NUL, for use with xargs')), |
3215 ('f', 'fullpath', None, | 3218 ('f', 'fullpath', None, |
3216 _('print complete paths from the filesystem root')), | 3219 _('print complete paths from the filesystem root')), |
3217 ] + walkopts, | 3220 ] + walkopts, |
3218 _('hg locate [OPTION]... [PATTERN]...')), | 3221 _('[OPTION]... [PATTERN]...')), |
3219 "^log|history": | 3222 "^log|history": |
3220 (log, | 3223 (log, |
3221 [('f', 'follow', None, | 3224 [('f', 'follow', None, |
3222 _('follow changeset history, or file history across copies and renames')), | 3225 _('follow changeset history, or file history across copies and renames')), |
3223 ('', 'follow-first', None, | 3226 ('', 'follow-first', None, |
3231 ('u', 'user', [], _('revs committed by user')), | 3234 ('u', 'user', [], _('revs committed by user')), |
3232 ('b', 'only-branch', [], | 3235 ('b', 'only-branch', [], |
3233 _('show only changesets within the given named branch')), | 3236 _('show only changesets within the given named branch')), |
3234 ('P', 'prune', [], _('do not display revision or any of its ancestors')), | 3237 ('P', 'prune', [], _('do not display revision or any of its ancestors')), |
3235 ] + logopts + walkopts, | 3238 ] + logopts + walkopts, |
3236 _('hg log [OPTION]... [FILE]')), | 3239 _('[OPTION]... [FILE]')), |
3237 "manifest": | 3240 "manifest": |
3238 (manifest, | 3241 (manifest, |
3239 [('r', 'rev', '', _('revision to display'))], | 3242 [('r', 'rev', '', _('revision to display'))], |
3240 _('hg manifest [-r REV]')), | 3243 _('[-r REV]')), |
3241 "^merge": | 3244 "^merge": |
3242 (merge, | 3245 (merge, |
3243 [('f', 'force', None, _('force a merge with outstanding changes')), | 3246 [('f', 'force', None, _('force a merge with outstanding changes')), |
3244 ('r', 'rev', '', _('revision to merge')), | 3247 ('r', 'rev', '', _('revision to merge')), |
3245 ], | 3248 ], |
3246 _('hg merge [-f] [[-r] REV]')), | 3249 _('[-f] [[-r] REV]')), |
3247 "outgoing|out": | 3250 "outgoing|out": |
3248 (outgoing, | 3251 (outgoing, |
3249 [('f', 'force', None, | 3252 [('f', 'force', None, |
3250 _('run even when remote repository is unrelated')), | 3253 _('run even when remote repository is unrelated')), |
3251 ('r', 'rev', [], | 3254 ('r', 'rev', [], |
3252 _('a specific revision up to which you would like to push')), | 3255 _('a specific revision up to which you would like to push')), |
3253 ('n', 'newest-first', None, _('show newest record first')), | 3256 ('n', 'newest-first', None, _('show newest record first')), |
3254 ] + logopts + remoteopts, | 3257 ] + logopts + remoteopts, |
3255 _('hg outgoing [-M] [-p] [-n] [-f] [-r REV]... [DEST]')), | 3258 _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), |
3256 "^parents": | 3259 "^parents": |
3257 (parents, | 3260 (parents, |
3258 [('r', 'rev', '', _('show parents from the specified rev')), | 3261 [('r', 'rev', '', _('show parents from the specified rev')), |
3259 ] + templateopts, | 3262 ] + templateopts, |
3260 _('hg parents [-r REV] [FILE]')), | 3263 _('hg parents [-r REV] [FILE]')), |
3261 "paths": (paths, [], _('hg paths [NAME]')), | 3264 "paths": (paths, [], _('[NAME]')), |
3262 "^pull": | 3265 "^pull": |
3263 (pull, | 3266 (pull, |
3264 [('u', 'update', None, | 3267 [('u', 'update', None, |
3265 _('update to new tip if changesets were pulled')), | 3268 _('update to new tip if changesets were pulled')), |
3266 ('f', 'force', None, | 3269 ('f', 'force', None, |
3267 _('run even when remote repository is unrelated')), | 3270 _('run even when remote repository is unrelated')), |
3268 ('r', 'rev', [], | 3271 ('r', 'rev', [], |
3269 _('a specific revision up to which you would like to pull')), | 3272 _('a specific revision up to which you would like to pull')), |
3270 ] + remoteopts, | 3273 ] + remoteopts, |
3271 _('hg pull [-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')), | 3274 _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')), |
3272 "^push": | 3275 "^push": |
3273 (push, | 3276 (push, |
3274 [('f', 'force', None, _('force push')), | 3277 [('f', 'force', None, _('force push')), |
3275 ('r', 'rev', [], | 3278 ('r', 'rev', [], |
3276 _('a specific revision up to which you would like to push')), | 3279 _('a specific revision up to which you would like to push')), |
3277 ] + remoteopts, | 3280 ] + remoteopts, |
3278 _('hg push [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')), | 3281 _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')), |
3279 "recover": (recover, [], _('hg recover')), | 3282 "recover": (recover, []), |
3280 "^remove|rm": | 3283 "^remove|rm": |
3281 (remove, | 3284 (remove, |
3282 [('A', 'after', None, _('record delete for missing files')), | 3285 [('A', 'after', None, _('record delete for missing files')), |
3283 ('f', 'force', None, | 3286 ('f', 'force', None, |
3284 _('remove (and delete) file even if added or modified')), | 3287 _('remove (and delete) file even if added or modified')), |
3285 ] + walkopts, | 3288 ] + walkopts, |
3286 _('hg remove [OPTION]... FILE...')), | 3289 _('[OPTION]... FILE...')), |
3287 "rename|mv": | 3290 "rename|mv": |
3288 (rename, | 3291 (rename, |
3289 [('A', 'after', None, _('record a rename that has already occurred')), | 3292 [('A', 'after', None, _('record a rename that has already occurred')), |
3290 ('f', 'force', None, | 3293 ('f', 'force', None, |
3291 _('forcibly copy over an existing managed file')), | 3294 _('forcibly copy over an existing managed file')), |
3292 ] + walkopts + dryrunopts, | 3295 ] + walkopts + dryrunopts, |
3293 _('hg rename [OPTION]... SOURCE... DEST')), | 3296 _('[OPTION]... SOURCE... DEST')), |
3294 "resolve": | 3297 "resolve": |
3295 (resolve, | 3298 (resolve, |
3296 [('l', 'list', None, _('list state of files needing merge')), | 3299 [('l', 'list', None, _('list state of files needing merge')), |
3297 ('m', 'mark', None, _('mark files as resolved')), | 3300 ('m', 'mark', None, _('mark files as resolved')), |
3298 ('u', 'unmark', None, _('unmark files as resolved'))], | 3301 ('u', 'unmark', None, _('unmark files as resolved'))], |
3299 _('hg resolve [OPTION]... [FILE]...')), | 3302 _('[OPTION]... [FILE]...')), |
3300 "revert": | 3303 "revert": |
3301 (revert, | 3304 (revert, |
3302 [('a', 'all', None, _('revert all changes when no arguments given')), | 3305 [('a', 'all', None, _('revert all changes when no arguments given')), |
3303 ('d', 'date', '', _('tipmost revision matching date')), | 3306 ('d', 'date', '', _('tipmost revision matching date')), |
3304 ('r', 'rev', '', _('revision to revert to')), | 3307 ('r', 'rev', '', _('revision to revert to')), |
3305 ('', 'no-backup', None, _('do not save backup copies of files')), | 3308 ('', 'no-backup', None, _('do not save backup copies of files')), |
3306 ] + walkopts + dryrunopts, | 3309 ] + walkopts + dryrunopts, |
3307 _('hg revert [OPTION]... [-r REV] [NAME]...')), | 3310 _('[OPTION]... [-r REV] [NAME]...')), |
3308 "rollback": (rollback, [], _('hg rollback')), | 3311 "rollback": (rollback, []), |
3309 "root": (root, [], _('hg root')), | 3312 "root": (root, []), |
3310 "^serve": | 3313 "^serve": |
3311 (serve, | 3314 (serve, |
3312 [('A', 'accesslog', '', _('name of access log file to write to')), | 3315 [('A', 'accesslog', '', _('name of access log file to write to')), |
3313 ('d', 'daemon', None, _('run server in background')), | 3316 ('d', 'daemon', None, _('run server in background')), |
3314 ('', 'daemon-pipefds', '', _('used internally by daemon mode')), | 3317 ('', 'daemon-pipefds', '', _('used internally by daemon mode')), |
3324 ('', 'stdio', None, _('for remote clients')), | 3327 ('', 'stdio', None, _('for remote clients')), |
3325 ('t', 'templates', '', _('web templates to use')), | 3328 ('t', 'templates', '', _('web templates to use')), |
3326 ('', 'style', '', _('template style to use')), | 3329 ('', 'style', '', _('template style to use')), |
3327 ('6', 'ipv6', None, _('use IPv6 in addition to IPv4')), | 3330 ('6', 'ipv6', None, _('use IPv6 in addition to IPv4')), |
3328 ('', 'certificate', '', _('SSL certificate file'))], | 3331 ('', 'certificate', '', _('SSL certificate file'))], |
3329 _('hg serve [OPTION]...')), | 3332 _('[OPTION]...')), |
3330 "showconfig|debugconfig": | 3333 "showconfig|debugconfig": |
3331 (showconfig, | 3334 (showconfig, |
3332 [('u', 'untrusted', None, _('show untrusted configuration options'))], | 3335 [('u', 'untrusted', None, _('show untrusted configuration options'))], |
3333 _('hg showconfig [-u] [NAME]...')), | 3336 _('[-u] [NAME]...')), |
3334 "^status|st": | 3337 "^status|st": |
3335 (status, | 3338 (status, |
3336 [('A', 'all', None, _('show status of all files')), | 3339 [('A', 'all', None, _('show status of all files')), |
3337 ('m', 'modified', None, _('show only modified files')), | 3340 ('m', 'modified', None, _('show only modified files')), |
3338 ('a', 'added', None, _('show only added files')), | 3341 ('a', 'added', None, _('show only added files')), |
3345 ('C', 'copies', None, _('show source of copied files')), | 3348 ('C', 'copies', None, _('show source of copied files')), |
3346 ('0', 'print0', None, | 3349 ('0', 'print0', None, |
3347 _('end filenames with NUL, for use with xargs')), | 3350 _('end filenames with NUL, for use with xargs')), |
3348 ('', 'rev', [], _('show difference from revision')), | 3351 ('', 'rev', [], _('show difference from revision')), |
3349 ] + walkopts, | 3352 ] + walkopts, |
3350 _('hg status [OPTION]... [FILE]...')), | 3353 _('[OPTION]... [FILE]...')), |
3351 "tag": | 3354 "tag": |
3352 (tag, | 3355 (tag, |
3353 [('f', 'force', None, _('replace existing tag')), | 3356 [('f', 'force', None, _('replace existing tag')), |
3354 ('l', 'local', None, _('make the tag local')), | 3357 ('l', 'local', None, _('make the tag local')), |
3355 ('r', 'rev', '', _('revision to tag')), | 3358 ('r', 'rev', '', _('revision to tag')), |
3356 ('', 'remove', None, _('remove a tag')), | 3359 ('', 'remove', None, _('remove a tag')), |
3357 # -l/--local is already there, commitopts cannot be used | 3360 # -l/--local is already there, commitopts cannot be used |
3358 ('m', 'message', '', _('use <text> as commit message')), | 3361 ('m', 'message', '', _('use <text> as commit message')), |
3359 ] + commitopts2, | 3362 ] + commitopts2, |
3360 _('hg tag [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')), | 3363 _('[-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')), |
3361 "tags": (tags, [], _('hg tags')), | 3364 "tags": (tags, []), |
3362 "tip": | 3365 "tip": |
3363 (tip, | 3366 (tip, |
3364 [('p', 'patch', None, _('show patch')), | 3367 [('p', 'patch', None, _('show patch')), |
3365 ] + templateopts, | 3368 ] + templateopts, |
3366 _('hg tip [-p]')), | 3369 _('[-p]')), |
3367 "unbundle": | 3370 "unbundle": |
3368 (unbundle, | 3371 (unbundle, |
3369 [('u', 'update', None, | 3372 [('u', 'update', None, |
3370 _('update to new tip if changesets were unbundled'))], | 3373 _('update to new tip if changesets were unbundled'))], |
3371 _('hg unbundle [-u] FILE...')), | 3374 _('[-u] FILE...')), |
3372 "^update|up|checkout|co": | 3375 "^update|up|checkout|co": |
3373 (update, | 3376 (update, |
3374 [('C', 'clean', None, _('overwrite locally modified files (no backup)')), | 3377 [('C', 'clean', None, _('overwrite locally modified files (no backup)')), |
3375 ('d', 'date', '', _('tipmost revision matching date')), | 3378 ('d', 'date', '', _('tipmost revision matching date')), |
3376 ('r', 'rev', '', _('revision'))], | 3379 ('r', 'rev', '', _('revision'))], |
3377 _('hg update [-C] [-d DATE] [[-r] REV]')), | 3380 _('[-C] [-d DATE] [[-r] REV]')), |
3378 "verify": (verify, [], _('hg verify')), | 3381 "verify": (verify, []), |
3379 "version": (version_, [], _('hg version')), | 3382 "version": (version_, []), |
3380 } | 3383 } |
3381 | 3384 |
3382 norepo = ("clone init version help debugcomplete debugdata" | 3385 norepo = ("clone init version help debugcomplete debugdata" |
3383 " debugindex debugindexdot debugdate debuginstall debugfsinfo") | 3386 " debugindex debugindexdot debugdate debuginstall debugfsinfo") |
3384 optionalrepo = ("identify paths serve showconfig debugancestor") | 3387 optionalrepo = ("identify paths serve showconfig debugancestor") |