diff hgext/shelve.py @ 23877:7cc77030c557

localrepo: remove all external users of localrepo.opener This change touches every module in which repository.opener was being used, and changes it for the equivalent repository.vfs. This is meant to make it easier to split the repository.vfs into several separate vfs. It should now be possible to remove localrepo.opener.
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Thu, 15 Jan 2015 23:17:12 +0100
parents ebef5fcf7bd0
children cda18ded2c48
line wrap: on
line diff
--- a/hgext/shelve.py	Wed Jan 14 20:29:47 2015 -0800
+++ b/hgext/shelve.py	Thu Jan 15 23:17:12 2015 +0100
@@ -95,7 +95,7 @@
 
     @classmethod
     def load(cls, repo):
-        fp = repo.opener(cls._filename)
+        fp = repo.vfs(cls._filename)
         try:
             version = int(fp.readline().strip())
 
@@ -121,7 +121,7 @@
 
     @classmethod
     def save(cls, repo, name, originalwctx, pendingctx, stripnodes):
-        fp = repo.opener(cls._filename, 'wb')
+        fp = repo.vfs(cls._filename, 'wb')
         fp.write('%i\n' % cls._version)
         fp.write('%s\n' % name)
         fp.write('%s\n' % hex(originalwctx.node()))