D4552: shelve: use bundlerepo.instance() to construct a repo object

2018-09-13 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG84d6e9a2b104: shelve: use bundlerepo.instance() to 
construct a repo object (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4552?vs=10984=10995

REVISION DETAIL
  https://phab.mercurial-scm.org/D4552

AFFECTED FILES
  hgext/shelve.py

CHANGE DETAILS

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -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':



To: indygreg, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D4552: shelve: use bundlerepo.instance() to construct a repo object

2018-09-12 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4552

AFFECTED FILES
  hgext/shelve.py

CHANGE DETAILS

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -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':



To: indygreg, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel