diff mercurial/statichttprepo.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 3c2419e07df5
children 37a92908a382
line wrap: on
line diff
--- a/mercurial/statichttprepo.py	Wed Jan 14 20:29:47 2015 -0800
+++ b/mercurial/statichttprepo.py	Thu Jan 15 23:17:12 2015 +0100
@@ -109,7 +109,7 @@
         self.names = namespaces.namespaces()
 
         try:
-            requirements = scmutil.readrequires(self.opener, self.supported)
+            requirements = scmutil.readrequires(self.vfs, self.supported)
         except IOError, inst:
             if inst.errno != errno.ENOENT:
                 raise
@@ -117,7 +117,7 @@
 
             # check if it is a non-empty old-style repository
             try:
-                fp = self.opener("00changelog.i")
+                fp = self.vfs("00changelog.i")
                 fp.read(1)
                 fp.close()
             except IOError, inst: