mercurial/cmdutil.py
changeset 47072 4c041c71ec01
parent 47021 45dcb63f8ead
child 47127 5ffc6c18fb96
--- a/mercurial/cmdutil.py	Tue May 04 08:54:28 2021 -0700
+++ b/mercurial/cmdutil.py	Tue Apr 06 05:20:24 2021 +0200
@@ -61,6 +61,10 @@
     stringutil,
 )
 
+from .revlogutils import (
+    constants as revlog_constants,
+)
+
 if pycompat.TYPE_CHECKING:
     from typing import (
         Any,
@@ -1428,8 +1432,12 @@
             raise error.CommandError(cmd, _(b'invalid arguments'))
         if not os.path.isfile(file_):
             raise error.InputError(_(b"revlog '%s' not found") % file_)
+
+        target = (revlog_constants.KIND_OTHER, b'free-form:%s' % file_)
         r = revlog.revlog(
-            vfsmod.vfs(encoding.getcwd(), audit=False), file_[:-2] + b".i"
+            vfsmod.vfs(encoding.getcwd(), audit=False),
+            target=target,
+            indexfile=file_[:-2] + b".i",
         )
     return r