comparison mercurial/debugcommands.py @ 39281:dd6bc2509bdc

debugcommands: use openstorage() in debugdata (BC) Nothing we're doing here requires a revlog. So use openstorage(). .. bc:: `hg debugdata` no longer accepts the path to a revlog file. Differential Revision: https://phab.mercurial-scm.org/D4357
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 20 Aug 2018 23:08:57 +0000
parents cb9cf42c902f
children 828a45233036
comparison
equal deleted inserted replaced
39280:da459d426c20 39281:dd6bc2509bdc
554 if rev is not None: 554 if rev is not None:
555 raise error.CommandError('debugdata', _('invalid arguments')) 555 raise error.CommandError('debugdata', _('invalid arguments'))
556 file_, rev = None, file_ 556 file_, rev = None, file_
557 elif rev is None: 557 elif rev is None:
558 raise error.CommandError('debugdata', _('invalid arguments')) 558 raise error.CommandError('debugdata', _('invalid arguments'))
559 r = cmdutil.openrevlog(repo, 'debugdata', file_, opts) 559 r = cmdutil.openstorage(repo, 'debugdata', file_, opts)
560 try: 560 try:
561 ui.write(r.revision(r.lookup(rev), raw=True)) 561 ui.write(r.revision(r.lookup(rev), raw=True))
562 except KeyError: 562 except KeyError:
563 raise error.Abort(_('invalid revision identifier %s') % rev) 563 raise error.Abort(_('invalid revision identifier %s') % rev)
564 564