changeset 1465:777e5c369d99 stable

compat: use svfs instead of sopener The "new" attribute is about 2 years old so let's move on.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 29 Jun 2015 02:30:27 -0700
parents d830d4e9f212
children a433948ca8d2
files hgext/evolve.py hgext/inhibit.py hgext/obsolete.py hgext/pushexperiment.py
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Fri Jun 26 00:59:22 2015 -0700
+++ b/hgext/evolve.py	Mon Jun 29 02:30:27 2015 -0700
@@ -3336,7 +3336,7 @@
     if new_format == repo.obsstore._version:
         msg = _('New format is the same as the old format, not upgrading!')
         raise util.Abort(msg)
-    f = repo.sopener('obsstore', 'wb', atomictemp=True)
+    f = repo.svfs('obsstore', 'wb', atomictemp=True)
     origmarkers = repo.obsstore._all
     known = set()
     markers = []
--- a/hgext/inhibit.py	Fri Jun 26 00:59:22 2015 -0700
+++ b/hgext/inhibit.py	Mon Jun 29 02:30:27 2015 -0700
@@ -36,7 +36,7 @@
         def _obsinhibit(self):
             # XXX we should make sure it is invalidated by transaction failure
             obsinhibit = set()
-            raw = self.sopener.tryread('obsinhibit')
+            raw = self.svfs.tryread('obsinhibit')
             for i in xrange(0, len(raw), 20):
                 obsinhibit.add(raw[i:i+20])
             return obsinhibit
--- a/hgext/obsolete.py	Fri Jun 26 00:59:22 2015 -0700
+++ b/hgext/obsolete.py	Mon Jun 29 02:30:27 2015 -0700
@@ -48,7 +48,7 @@
     else:
         data = repo.opener.tryread('obsolete-relations')
         if not data:
-            data = repo.sopener.tryread('obsoletemarkers')
+            data = repo.svfs.tryread('obsoletemarkers')
         if data:
             raise util.Abort('old format of obsolete marker detected!\n'
                              'run `hg debugconvertobsolete` once.')
@@ -110,7 +110,7 @@
             except IOError:
                 pass
             ### second (json) format
-            data = repo.sopener.tryread('obsoletemarkers')
+            data = repo.svfs.tryread('obsoletemarkers')
             if data:
                 some = True
                 for oldmark in json.loads(data):
--- a/hgext/pushexperiment.py	Fri Jun 26 00:59:22 2015 -0700
+++ b/hgext/pushexperiment.py	Mon Jun 29 02:30:27 2015 -0700
@@ -80,7 +80,7 @@
         and remote.capable('_push_experiment_pushobsmarkers_0')):
         # push marker early to limit damage of pushing too early.
         try:
-            obsfp = repo.sopener('obsstore')
+            obsfp = repo.svfs('obsstore')
         except IOError as e:
             if e.errno != errno.ENOENT:
                 raise