mercurial/cmdutil.py
changeset 47089 4c041c71ec01
parent 47062 45dcb63f8ead
child 47141 5ffc6c18fb96
equal deleted inserted replaced
47088:3e381eb557f3 47089:4c041c71ec01
    57 )
    57 )
    58 
    58 
    59 from .utils import (
    59 from .utils import (
    60     dateutil,
    60     dateutil,
    61     stringutil,
    61     stringutil,
       
    62 )
       
    63 
       
    64 from .revlogutils import (
       
    65     constants as revlog_constants,
    62 )
    66 )
    63 
    67 
    64 if pycompat.TYPE_CHECKING:
    68 if pycompat.TYPE_CHECKING:
    65     from typing import (
    69     from typing import (
    66         Any,
    70         Any,
  1426 
  1430 
  1427         if not file_:
  1431         if not file_:
  1428             raise error.CommandError(cmd, _(b'invalid arguments'))
  1432             raise error.CommandError(cmd, _(b'invalid arguments'))
  1429         if not os.path.isfile(file_):
  1433         if not os.path.isfile(file_):
  1430             raise error.InputError(_(b"revlog '%s' not found") % file_)
  1434             raise error.InputError(_(b"revlog '%s' not found") % file_)
       
  1435 
       
  1436         target = (revlog_constants.KIND_OTHER, b'free-form:%s' % file_)
  1431         r = revlog.revlog(
  1437         r = revlog.revlog(
  1432             vfsmod.vfs(encoding.getcwd(), audit=False), file_[:-2] + b".i"
  1438             vfsmod.vfs(encoding.getcwd(), audit=False),
       
  1439             target=target,
       
  1440             indexfile=file_[:-2] + b".i",
  1433         )
  1441         )
  1434     return r
  1442     return r
  1435 
  1443 
  1436 
  1444 
  1437 def openrevlog(repo, cmd, file_, opts):
  1445 def openrevlog(repo, cmd, file_, opts):