mercurial/localrepo.py
changeset 39591 76b58f240821
parent 39590 e471cb2852ea
child 39606 c5e6c1ba1c79
--- a/mercurial/localrepo.py	Wed Sep 12 08:41:00 2018 -0700
+++ b/mercurial/localrepo.py	Wed Sep 12 12:01:32 2018 -0700
@@ -2377,10 +2377,11 @@
     return os.path.join(base, name.replace('journal', 'undo', 1))
 
 def instance(ui, path, create, intents=None, createopts=None):
+    localpath = util.urllocalpath(path)
     if create:
-        createrepository(ui, path, createopts=createopts)
+        createrepository(ui, localpath, createopts=createopts)
 
-    return localrepository(ui, util.urllocalpath(path), intents=intents)
+    return localrepository(ui, localpath, intents=intents)
 
 def islocal(path):
     return True