Show More
@@ -1795,6 +1795,42 b' def copy(ui, repo, *pats, **opts):' | |||||
1795 | with repo.wlock(False): |
|
1795 | with repo.wlock(False): | |
1796 | return cmdutil.copy(ui, repo, pats, opts) |
|
1796 | return cmdutil.copy(ui, repo, pats, opts) | |
1797 |
|
1797 | |||
|
1798 | @command('debugcommands', [], _('[COMMAND]'), norepo=True) | |||
|
1799 | def debugcommands(ui, cmd='', *args): | |||
|
1800 | """list all available commands and options""" | |||
|
1801 | for cmd, vals in sorted(table.iteritems()): | |||
|
1802 | cmd = cmd.split('|')[0].strip('^') | |||
|
1803 | opts = ', '.join([i[1] for i in vals[1]]) | |||
|
1804 | ui.write('%s: %s\n' % (cmd, opts)) | |||
|
1805 | ||||
|
1806 | @command('debugcomplete', | |||
|
1807 | [('o', 'options', None, _('show the command options'))], | |||
|
1808 | _('[-o] CMD'), | |||
|
1809 | norepo=True) | |||
|
1810 | def debugcomplete(ui, cmd='', **opts): | |||
|
1811 | """returns the completion list associated with the given command""" | |||
|
1812 | ||||
|
1813 | if opts.get('options'): | |||
|
1814 | options = [] | |||
|
1815 | otables = [globalopts] | |||
|
1816 | if cmd: | |||
|
1817 | aliases, entry = cmdutil.findcmd(cmd, table, False) | |||
|
1818 | otables.append(entry[1]) | |||
|
1819 | for t in otables: | |||
|
1820 | for o in t: | |||
|
1821 | if "(DEPRECATED)" in o[3]: | |||
|
1822 | continue | |||
|
1823 | if o[0]: | |||
|
1824 | options.append('-%s' % o[0]) | |||
|
1825 | options.append('--%s' % o[1]) | |||
|
1826 | ui.write("%s\n" % "\n".join(options)) | |||
|
1827 | return | |||
|
1828 | ||||
|
1829 | cmdlist, unused_allcmds = cmdutil.findpossible(cmd, table) | |||
|
1830 | if ui.verbose: | |||
|
1831 | cmdlist = [' '.join(c[0]) for c in cmdlist.values()] | |||
|
1832 | ui.write("%s\n" % "\n".join(sorted(cmdlist))) | |||
|
1833 | ||||
1798 | @command('^diff', |
|
1834 | @command('^diff', | |
1799 | [('r', 'rev', [], _('revision'), _('REV')), |
|
1835 | [('r', 'rev', [], _('revision'), _('REV')), | |
1800 | ('c', 'change', '', _('change made by revision'), _('REV')) |
|
1836 | ('c', 'change', '', _('change made by revision'), _('REV')) |
@@ -390,42 +390,6 b' def _debugdisplaystyle(ui):' | |||||
390 | ui.write(', '.join(ui.label(e, e) for e in effects.split())) |
|
390 | ui.write(', '.join(ui.label(e, e) for e in effects.split())) | |
391 | ui.write('\n') |
|
391 | ui.write('\n') | |
392 |
|
392 | |||
393 | @command('debugcommands', [], _('[COMMAND]'), norepo=True) |
|
|||
394 | def debugcommands(ui, cmd='', *args): |
|
|||
395 | """list all available commands and options""" |
|
|||
396 | for cmd, vals in sorted(commands.table.iteritems()): |
|
|||
397 | cmd = cmd.split('|')[0].strip('^') |
|
|||
398 | opts = ', '.join([i[1] for i in vals[1]]) |
|
|||
399 | ui.write('%s: %s\n' % (cmd, opts)) |
|
|||
400 |
|
||||
401 | @command('debugcomplete', |
|
|||
402 | [('o', 'options', None, _('show the command options'))], |
|
|||
403 | _('[-o] CMD'), |
|
|||
404 | norepo=True) |
|
|||
405 | def debugcomplete(ui, cmd='', **opts): |
|
|||
406 | """returns the completion list associated with the given command""" |
|
|||
407 |
|
||||
408 | if opts.get('options'): |
|
|||
409 | options = [] |
|
|||
410 | otables = [commands.globalopts] |
|
|||
411 | if cmd: |
|
|||
412 | aliases, entry = cmdutil.findcmd(cmd, commands.table, False) |
|
|||
413 | otables.append(entry[1]) |
|
|||
414 | for t in otables: |
|
|||
415 | for o in t: |
|
|||
416 | if "(DEPRECATED)" in o[3]: |
|
|||
417 | continue |
|
|||
418 | if o[0]: |
|
|||
419 | options.append('-%s' % o[0]) |
|
|||
420 | options.append('--%s' % o[1]) |
|
|||
421 | ui.write("%s\n" % "\n".join(options)) |
|
|||
422 | return |
|
|||
423 |
|
||||
424 | cmdlist, unused_allcmds = cmdutil.findpossible(cmd, commands.table) |
|
|||
425 | if ui.verbose: |
|
|||
426 | cmdlist = [' '.join(c[0]) for c in cmdlist.values()] |
|
|||
427 | ui.write("%s\n" % "\n".join(sorted(cmdlist))) |
|
|||
428 |
|
||||
429 | @command('debugcreatestreamclonebundle', [], 'FILE') |
|
393 | @command('debugcreatestreamclonebundle', [], 'FILE') | |
430 | def debugcreatestreamclonebundle(ui, repo, fname): |
|
394 | def debugcreatestreamclonebundle(ui, repo, fname): | |
431 | """create a stream clone bundle file |
|
395 | """create a stream clone bundle file |
General Comments 0
You need to be logged in to leave comments.
Login now