changeset 7392:b2c15f308ad2

hg: use localrepo.instance instead of invoking localrepository directly The instance method has been available for very long time and does almost the same thing. Also, for Mercurial 4.8, the create functionality is only available on the instance factory.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 29 Oct 2018 01:20:08 +0100
parents c363f492c117
children 6834e1265415
files kallithea/lib/vcs/backends/hg/repository.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/hg/repository.py	Mon Oct 29 01:07:18 2018 +0100
+++ b/kallithea/lib/vcs/backends/hg/repository.py	Mon Oct 29 01:20:08 2018 +0100
@@ -364,7 +364,7 @@
 
                 # Don't try to create if we've already cloned repo
                 create = False
-            return localrepo.localrepository(self.baseui, self.path, create=create)
+            return localrepo.instance(self.baseui, self.path, create=create)
         except (Abort, RepoError) as err:
             if create:
                 msg = "Cannot create repository at %s. Original error was %s" \