comparison mercurial/commands.py @ 3281:45b639607e52

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Fri, 06 Oct 2006 17:14:18 -0500
parents 23682d3e4111
children d89e98840b08
comparison
equal deleted inserted replaced
3280:ae85272b59a4 3281:45b639607e52
1132 errors += 1 1132 errors += 1
1133 if errors: 1133 if errors:
1134 error = _(".hg/dirstate inconsistent with current parent's manifest") 1134 error = _(".hg/dirstate inconsistent with current parent's manifest")
1135 raise util.Abort(error) 1135 raise util.Abort(error)
1136 1136
1137 def debugconfig(ui, repo, *values): 1137 def showconfig(ui, repo, *values):
1138 """show combined config settings from all hgrc files 1138 """show combined config settings from all hgrc files
1139 1139
1140 With no args, print names and values of all config items. 1140 With no args, print names and values of all config items.
1141 1141
1142 With one arg of the form section.name, print just the value of 1142 With one arg of the form section.name, print just the value of
2832 "debugrebuildstate": 2832 "debugrebuildstate":
2833 (debugrebuildstate, 2833 (debugrebuildstate,
2834 [('r', 'rev', '', _('revision to rebuild to'))], 2834 [('r', 'rev', '', _('revision to rebuild to'))],
2835 _('debugrebuildstate [-r REV] [REV]')), 2835 _('debugrebuildstate [-r REV] [REV]')),
2836 "debugcheckstate": (debugcheckstate, [], _('debugcheckstate')), 2836 "debugcheckstate": (debugcheckstate, [], _('debugcheckstate')),
2837 "debugconfig": (debugconfig, [], _('debugconfig [NAME]...')),
2838 "debugsetparents": (debugsetparents, [], _('debugsetparents REV1 [REV2]')), 2837 "debugsetparents": (debugsetparents, [], _('debugsetparents REV1 [REV2]')),
2839 "debugstate": (debugstate, [], _('debugstate')), 2838 "debugstate": (debugstate, [], _('debugstate')),
2840 "debugdata": (debugdata, [], _('debugdata FILE REV')), 2839 "debugdata": (debugdata, [], _('debugdata FILE REV')),
2841 "debugindex": (debugindex, [], _('debugindex FILE')), 2840 "debugindex": (debugindex, [], _('debugindex FILE')),
2842 "debugindexdot": (debugindexdot, [], _('debugindexdot FILE')), 2841 "debugindexdot": (debugindexdot, [], _('debugindexdot FILE')),
3015 ('', 'no-backup', None, _('do not save backup copies of files')), 3014 ('', 'no-backup', None, _('do not save backup copies of files')),
3016 ] + walkopts + dryrunopts, 3015 ] + walkopts + dryrunopts,
3017 _('hg revert [-r REV] [NAME]...')), 3016 _('hg revert [-r REV] [NAME]...')),
3018 "rollback": (rollback, [], _('hg rollback')), 3017 "rollback": (rollback, [], _('hg rollback')),
3019 "root": (root, [], _('hg root')), 3018 "root": (root, [], _('hg root')),
3019 "showconfig|debugconfig": (showconfig, [], _('showconfig [NAME]...')),
3020 "^serve": 3020 "^serve":
3021 (serve, 3021 (serve,
3022 [('A', 'accesslog', '', _('name of access log file to write to')), 3022 [('A', 'accesslog', '', _('name of access log file to write to')),
3023 ('d', 'daemon', None, _('run server in background')), 3023 ('d', 'daemon', None, _('run server in background')),
3024 ('', 'daemon-pipefds', '', _('used internally by daemon mode')), 3024 ('', 'daemon-pipefds', '', _('used internally by daemon mode')),
3084 "version": (show_version, [], _('hg version')), 3084 "version": (show_version, [], _('hg version')),
3085 } 3085 }
3086 3086
3087 norepo = ("clone init version help debugancestor debugcomplete debugdata" 3087 norepo = ("clone init version help debugancestor debugcomplete debugdata"
3088 " debugindex debugindexdot") 3088 " debugindex debugindexdot")
3089 optionalrepo = ("paths serve debugconfig") 3089 optionalrepo = ("paths serve showconfig")
3090 3090
3091 def findpossible(ui, cmd): 3091 def findpossible(ui, cmd):
3092 """ 3092 """
3093 Return cmd -> (aliases, command table entry) 3093 Return cmd -> (aliases, command table entry)
3094 for each matching command. 3094 for each matching command.
3281 raise util.Abort('%s: %s' % 3281 raise util.Abort('%s: %s' %
3282 (options['cwd'], inst.strerror)) 3282 (options['cwd'], inst.strerror))
3283 3283
3284 path = u.expandpath(options["repository"]) or "" 3284 path = u.expandpath(options["repository"]) or ""
3285 repo = path and hg.repository(u, path=path) or None 3285 repo = path and hg.repository(u, path=path) or None
3286 if repo and not repo.local():
3287 raise util.Abort(_("repository '%s' is not local") % path)
3286 3288
3287 if options['help']: 3289 if options['help']:
3288 return help_(u, cmd, options['version']) 3290 return help_(u, cmd, options['version'])
3289 elif options['version']: 3291 elif options['version']:
3290 return show_version(u) 3292 return show_version(u)