mercurial/cmdutil.py
changeset 50556 7b0cc86c5d74
parent 50373 4fafc6642bee
child 50824 489268c8ee7e
equal deleted inserted replaced
50555:b0e3f1508a25 50556:7b0cc86c5d74
  1448         # Not all storage may be revlogs. If requested, try to return an actual
  1448         # Not all storage may be revlogs. If requested, try to return an actual
  1449         # revlog instance.
  1449         # revlog instance.
  1450         if returnrevlog:
  1450         if returnrevlog:
  1451             if isinstance(r, revlog.revlog):
  1451             if isinstance(r, revlog.revlog):
  1452                 pass
  1452                 pass
  1453             elif util.safehasattr(r, b'_revlog'):
  1453             elif util.safehasattr(r, '_revlog'):
  1454                 r = r._revlog  # pytype: disable=attribute-error
  1454                 r = r._revlog  # pytype: disable=attribute-error
  1455             elif r is not None:
  1455             elif r is not None:
  1456                 raise error.InputError(
  1456                 raise error.InputError(
  1457                     _(b'%r does not appear to be a revlog') % r
  1457                     _(b'%r does not appear to be a revlog') % r
  1458                 )
  1458                 )