comparison mercurial/debugcommands.py @ 30743:2df983125d37

revlog: add 'raw' argument to revision and _addrevision This patch introduces a new 'raw' argument (defaults to False) to revlog's revision() and _addrevision() methods. When the 'raw' argument is set to True, it indicates the revision data should be handled as raw data by the flagprocessor. Note: Given revlog.addgroup() calls are restricted to changegroup generation, we can always set raw to True when calling revlog._addrevision() from revlog.addgroup().
author Remi Chaintron <remi@fb.com>
date Thu, 05 Jan 2017 17:16:07 +0000
parents 342d0cb4f446
children eaa5607132a2
comparison
equal deleted inserted replaced
30742:d3e2d39b97ea 30743:2df983125d37
443 file_, rev = None, file_ 443 file_, rev = None, file_
444 elif rev is None: 444 elif rev is None:
445 raise error.CommandError('debugdata', _('invalid arguments')) 445 raise error.CommandError('debugdata', _('invalid arguments'))
446 r = cmdutil.openrevlog(repo, 'debugdata', file_, opts) 446 r = cmdutil.openrevlog(repo, 'debugdata', file_, opts)
447 try: 447 try:
448 ui.write(r.revision(r.lookup(rev))) 448 ui.write(r.revision(r.lookup(rev), raw=True))
449 except KeyError: 449 except KeyError:
450 raise error.Abort(_('invalid revision identifier %s') % rev) 450 raise error.Abort(_('invalid revision identifier %s') % rev)
451 451
452 @command('debugdate', 452 @command('debugdate',
453 [('e', 'extended', None, _('try extended date formats'))], 453 [('e', 'extended', None, _('try extended date formats'))],