# HG changeset patch # User Pierre-Yves David # Date 1435570227 25200 # Node ID 777e5c369d9988d1518865cf74e536b35bba445e # Parent d830d4e9f2123045a3ea10c33ecf355fa423e87f compat: use svfs instead of sopener The "new" attribute is about 2 years old so let's move on. diff -r d830d4e9f212 -r 777e5c369d99 hgext/evolve.py --- 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 = [] diff -r d830d4e9f212 -r 777e5c369d99 hgext/inhibit.py --- 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 diff -r d830d4e9f212 -r 777e5c369d99 hgext/obsolete.py --- 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): diff -r d830d4e9f212 -r 777e5c369d99 hgext/pushexperiment.py --- 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