mercurial/localrepo.py
changeset 39687 bfeab472e3c0
parent 39668 24870f1be088
child 39688 2f9cdb5b3644
--- a/mercurial/localrepo.py	Mon Sep 17 16:29:12 2018 -0700
+++ b/mercurial/localrepo.py	Wed Sep 12 11:02:16 2018 -0700
@@ -376,6 +376,18 @@
 # set to reflect that the extension knows how to handle that requirements.
 featuresetupfuncs = set()
 
+def makelocalrepository(ui, path, intents=None):
+    """Create a local repository object.
+
+    Given arguments needed to construct a local repository, this function
+    derives a type suitable for representing that repository and returns an
+    instance of it.
+
+    The returned object conforms to the ``repository.completelocalrepository``
+    interface.
+    """
+    return localrepository(ui, path, intents=intents)
+
 @interfaceutil.implementer(repository.completelocalrepository)
 class localrepository(object):
 
@@ -2388,7 +2400,7 @@
     if create:
         createrepository(ui, localpath, createopts=createopts)
 
-    return localrepository(ui, localpath, intents=intents)
+    return makelocalrepository(ui, localpath, intents=intents)
 
 def islocal(path):
     return True