1865 Returns 0 on success, 1 if errors are encountered. |
1865 Returns 0 on success, 1 if errors are encountered. |
1866 """ |
1866 """ |
1867 with repo.wlock(False): |
1867 with repo.wlock(False): |
1868 return cmdutil.copy(ui, repo, pats, opts) |
1868 return cmdutil.copy(ui, repo, pats, opts) |
1869 |
1869 |
1870 @command('debugcommands', [], _('[COMMAND]'), norepo=True) |
|
1871 def debugcommands(ui, cmd='', *args): |
|
1872 """list all available commands and options""" |
|
1873 for cmd, vals in sorted(table.iteritems()): |
|
1874 cmd = cmd.split('|')[0].strip('^') |
|
1875 opts = ', '.join([i[1] for i in vals[1]]) |
|
1876 ui.write('%s: %s\n' % (cmd, opts)) |
|
1877 |
|
1878 @command('debugcomplete', |
1870 @command('debugcomplete', |
1879 [('o', 'options', None, _('show the command options'))], |
1871 [('o', 'options', None, _('show the command options'))], |
1880 _('[-o] CMD'), |
1872 _('[-o] CMD'), |
1881 norepo=True) |
1873 norepo=True) |
1882 def debugcomplete(ui, cmd='', **opts): |
1874 def debugcomplete(ui, cmd='', **opts): |