mercurial/cmdutil.py
changeset 50925 d718eddf01d9
parent 50907 1270677d740b
child 50926 18c8c18993f0
equal deleted inserted replaced
50924:7a8ea1397816 50925:d718eddf01d9
  1447         # Not all storage may be revlogs. If requested, try to return an actual
  1447         # Not all storage may be revlogs. If requested, try to return an actual
  1448         # revlog instance.
  1448         # revlog instance.
  1449         if returnrevlog:
  1449         if returnrevlog:
  1450             if isinstance(r, revlog.revlog):
  1450             if isinstance(r, revlog.revlog):
  1451                 pass
  1451                 pass
  1452             elif util.safehasattr(r, '_revlog'):
  1452             elif hasattr(r, '_revlog'):
  1453                 r = r._revlog  # pytype: disable=attribute-error
  1453                 r = r._revlog  # pytype: disable=attribute-error
  1454             elif r is not None:
  1454             elif r is not None:
  1455                 raise error.InputError(
  1455                 raise error.InputError(
  1456                     _(b'%r does not appear to be a revlog') % r
  1456                     _(b'%r does not appear to be a revlog') % r
  1457                 )
  1457                 )