changeset 39601:84d6e9a2b104

shelve: use bundlerepo.instance() to construct a repo object The instance() functions are preferred over cls.__init__ for creating repo instances. It doesn't really matter now. But future commits will refactor the bundlerepository class in ways that will cause the old way to break. Differential Revision: https://phab.mercurial-scm.org/D4552
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 11 Sep 2018 18:41:14 -0700
parents 87428152e820
children 2d2bbf3f3e09
files hgext/shelve.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Sun Jul 29 22:04:01 2018 +0900
+++ b/hgext/shelve.py	Tue Sep 11 18:41:14 2018 -0700
@@ -152,8 +152,10 @@
             fp.close()
 
     def bundlerepo(self):
-        return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root,
-                                           self.vfs.join(self.fname))
+        path = self.vfs.join(self.fname)
+        return bundlerepo.instance(self.repo.baseui,
+                                   'bundle://%s+%s' % (self.repo.root, path))
+
     def writebundle(self, bases, node):
         cgversion = changegroup.safeversion(self.repo)
         if cgversion == '01':