1863 Returns 0 on success, 1 if errors are encountered. |
1863 Returns 0 on success, 1 if errors are encountered. |
1864 """ |
1864 """ |
1865 with repo.wlock(False): |
1865 with repo.wlock(False): |
1866 return cmdutil.copy(ui, repo, pats, opts) |
1866 return cmdutil.copy(ui, repo, pats, opts) |
1867 |
1867 |
1868 @command('debugdata', debugrevlogopts, _('-c|-m|FILE REV')) |
|
1869 def debugdata(ui, repo, file_, rev=None, **opts): |
|
1870 """dump the contents of a data file revision""" |
|
1871 if opts.get('changelog') or opts.get('manifest') or opts.get('dir'): |
|
1872 if rev is not None: |
|
1873 raise error.CommandError('debugdata', _('invalid arguments')) |
|
1874 file_, rev = None, file_ |
|
1875 elif rev is None: |
|
1876 raise error.CommandError('debugdata', _('invalid arguments')) |
|
1877 r = cmdutil.openrevlog(repo, 'debugdata', file_, opts) |
|
1878 try: |
|
1879 ui.write(r.revision(r.lookup(rev))) |
|
1880 except KeyError: |
|
1881 raise error.Abort(_('invalid revision identifier %s') % rev) |
|
1882 |
|
1883 @command('debugdate', |
1868 @command('debugdate', |
1884 [('e', 'extended', None, _('try extended date formats'))], |
1869 [('e', 'extended', None, _('try extended date formats'))], |
1885 _('[-e] DATE [RANGE]'), |
1870 _('[-e] DATE [RANGE]'), |
1886 norepo=True, optionalrepo=True) |
1871 norepo=True, optionalrepo=True) |
1887 def debugdate(ui, date, range=None, **opts): |
1872 def debugdate(ui, date, range=None, **opts): |