# HG changeset patch # User Martin von Zweigbergk # Date 2018-09-12 19:01:32 # Node ID 76b58f240821ba242fb68fb251eccf78e56881d4 # Parent e471cb2852eab271e454d893994b4ac1b5dbc757 localrepo: use urllocalpath() for path to create repo too It looks like this was lost in 7ce9dea3a14a (localrepo: move repo creation logic out of localrepository.__init__ (API), 2018-09-11). I don't know when it makes a difference (maybe on Windows, since urllocalpath() mentions something about drive letters). Differential Revision: https://phab.mercurial-scm.org/D4550 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2377,10 +2377,11 @@ def undoname(fn): 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