Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 30504:c3bdc27121d1
debugcommands: move 'debugcommands' in the new module
The commit message isn't an illusion. There is a "debugcommands"
module and command.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 17 Aug 2016 20:40:13 -0700 |
parents | 6bfb333a6f2f |
children | 158b41842fd2 |
comparison
equal
deleted
inserted
replaced
30503:6bfb333a6f2f | 30504:c3bdc27121d1 |
---|---|
319 ui.warn(_("%s in manifest1, but listed as state %s") % (f, state)) | 319 ui.warn(_("%s in manifest1, but listed as state %s") % (f, state)) |
320 errors += 1 | 320 errors += 1 |
321 if errors: | 321 if errors: |
322 error = _(".hg/dirstate inconsistent with current parent's manifest") | 322 error = _(".hg/dirstate inconsistent with current parent's manifest") |
323 raise error.Abort(error) | 323 raise error.Abort(error) |
324 | |
325 @command('debugcommands', [], _('[COMMAND]'), norepo=True) | |
326 def debugcommands(ui, cmd='', *args): | |
327 """list all available commands and options""" | |
328 for cmd, vals in sorted(commands.table.iteritems()): | |
329 cmd = cmd.split('|')[0].strip('^') | |
330 opts = ', '.join([i[1] for i in vals[1]]) | |
331 ui.write('%s: %s\n' % (cmd, opts)) |