Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 3187:fca5ddbaa12a
factor opts: move globalopts to a more logical place
we will put other options at the same place
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 29 Sep 2006 18:39:08 +0200 |
parents | 3637d5d17cbc |
children | 725e3d3145d8 |
comparison
equal
deleted
inserted
replaced
3186:245bb70d7dfb | 3187:fca5ddbaa12a |
---|---|
2650 integrity of their crosslinks and indices. | 2650 integrity of their crosslinks and indices. |
2651 """ | 2651 """ |
2652 return hg.verify(repo) | 2652 return hg.verify(repo) |
2653 | 2653 |
2654 # Command options and aliases are listed here, alphabetically | 2654 # Command options and aliases are listed here, alphabetically |
2655 | |
2656 globalopts = [ | |
2657 ('R', 'repository', '', | |
2658 _('repository root directory or symbolic path name')), | |
2659 ('', 'cwd', '', _('change working directory')), | |
2660 ('y', 'noninteractive', None, | |
2661 _('do not prompt, assume \'yes\' for any required answers')), | |
2662 ('q', 'quiet', None, _('suppress output')), | |
2663 ('v', 'verbose', None, _('enable additional output')), | |
2664 ('', 'config', [], _('set/override config option')), | |
2665 ('', 'debug', None, _('enable debugging output')), | |
2666 ('', 'debugger', None, _('start debugger')), | |
2667 ('', 'lsprof', None, _('print improved command execution profile')), | |
2668 ('', 'traceback', None, _('print traceback on exception')), | |
2669 ('', 'time', None, _('time how long the command takes')), | |
2670 ('', 'profile', None, _('print command execution profile')), | |
2671 ('', 'version', None, _('output version information and exit')), | |
2672 ('h', 'help', None, _('display help and exit')), | |
2673 ] | |
2655 | 2674 |
2656 table = { | 2675 table = { |
2657 "^add": | 2676 "^add": |
2658 (add, | 2677 (add, |
2659 [('I', 'include', [], _('include names matching the given patterns')), | 2678 [('I', 'include', [], _('include names matching the given patterns')), |
3029 _('hg update [-b TAG] [-m] [-C] [-f] [REV]')), | 3048 _('hg update [-b TAG] [-m] [-C] [-f] [REV]')), |
3030 "verify": (verify, [], _('hg verify')), | 3049 "verify": (verify, [], _('hg verify')), |
3031 "version": (show_version, [], _('hg version')), | 3050 "version": (show_version, [], _('hg version')), |
3032 } | 3051 } |
3033 | 3052 |
3034 globalopts = [ | |
3035 ('R', 'repository', '', | |
3036 _('repository root directory or symbolic path name')), | |
3037 ('', 'cwd', '', _('change working directory')), | |
3038 ('y', 'noninteractive', None, | |
3039 _('do not prompt, assume \'yes\' for any required answers')), | |
3040 ('q', 'quiet', None, _('suppress output')), | |
3041 ('v', 'verbose', None, _('enable additional output')), | |
3042 ('', 'config', [], _('set/override config option')), | |
3043 ('', 'debug', None, _('enable debugging output')), | |
3044 ('', 'debugger', None, _('start debugger')), | |
3045 ('', 'lsprof', None, _('print improved command execution profile')), | |
3046 ('', 'traceback', None, _('print traceback on exception')), | |
3047 ('', 'time', None, _('time how long the command takes')), | |
3048 ('', 'profile', None, _('print command execution profile')), | |
3049 ('', 'version', None, _('output version information and exit')), | |
3050 ('h', 'help', None, _('display help and exit')), | |
3051 ] | |
3052 | |
3053 norepo = ("clone init version help debugancestor debugcomplete debugdata" | 3053 norepo = ("clone init version help debugancestor debugcomplete debugdata" |
3054 " debugindex debugindexdot") | 3054 " debugindex debugindexdot") |
3055 optionalrepo = ("paths serve debugconfig") | 3055 optionalrepo = ("paths serve debugconfig") |
3056 | 3056 |
3057 def findpossible(ui, cmd): | 3057 def findpossible(ui, cmd): |