mercurial/commands.py
changeset 29427 33a6b750b5b9
parent 29426 26ac04a39e11
child 29528 9c3786713926
equal deleted inserted replaced
29426:26ac04a39e11 29427:33a6b750b5b9
   214 ]
   214 ]
   215 
   215 
   216 debugrevlogopts = [
   216 debugrevlogopts = [
   217     ('c', 'changelog', False, _('open changelog')),
   217     ('c', 'changelog', False, _('open changelog')),
   218     ('m', 'manifest', False, _('open manifest')),
   218     ('m', 'manifest', False, _('open manifest')),
   219     ('', 'dir', False, _('open directory manifest')),
   219     ('', 'dir', '', _('open directory manifest')),
   220 ]
   220 ]
   221 
   221 
   222 # Commands start here, listed alphabetically
   222 # Commands start here, listed alphabetically
   223 
   223 
   224 @command('^add',
   224 @command('^add',
  2297         ui.write("\n")
  2297         ui.write("\n")
  2298 
  2298 
  2299 @command('debugdata', debugrevlogopts, _('-c|-m|FILE REV'))
  2299 @command('debugdata', debugrevlogopts, _('-c|-m|FILE REV'))
  2300 def debugdata(ui, repo, file_, rev=None, **opts):
  2300 def debugdata(ui, repo, file_, rev=None, **opts):
  2301     """dump the contents of a data file revision"""
  2301     """dump the contents of a data file revision"""
  2302     if opts.get('changelog') or opts.get('manifest'):
  2302     if opts.get('changelog') or opts.get('manifest') or opts.get('dir'):
  2303         if rev is not None:
  2303         if rev is not None:
  2304             raise error.CommandError('debugdata', _('invalid arguments'))
  2304             raise error.CommandError('debugdata', _('invalid arguments'))
  2305         file_, rev = None, file_
  2305         file_, rev = None, file_
  2306     elif rev is None:
  2306     elif rev is None:
  2307         raise error.CommandError('debugdata', _('invalid arguments'))
  2307         raise error.CommandError('debugdata', _('invalid arguments'))