Patchwork [4,of,5] obsolete: replace references to 'sopener' with 'svfs'

login
register
mail settings
Submitter Siddharth Agarwal
Date June 26, 2015, 5:24 a.m.
Message ID <0b3339c8522b8b5071ba.1435296251@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/9784/
State Accepted
Headers show

Comments

Siddharth Agarwal - June 26, 2015, 5:24 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1435295989 25200
#      Thu Jun 25 22:19:49 2015 -0700
# Node ID 0b3339c8522b8b5071badd9e90323bfeefd2603d
# Parent  edc7bbd277fd0c8f65a93a19c020adbd2d0575bd
obsolete: replace references to 'sopener' with 'svfs'

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -517,12 +517,12 @@  class obsstore(object):
     # parents: (tuple of nodeid) or None, parents of precursors
     #          None is used when no data has been recorded
 
-    def __init__(self, sopener, defaultformat=_fm1version, readonly=False):
+    def __init__(self, svfs, defaultformat=_fm1version, readonly=False):
         # caches for various obsolescence related cache
         self.caches = {}
         self._all = []
-        self.sopener = sopener
-        data = sopener.tryread('obsstore')
+        self.svfs = svfs
+        data = svfs.tryread('obsstore')
         self._version = defaultformat
         self._readonly = readonly
         if data:
@@ -588,7 +588,7 @@  class obsstore(object):
                 known.add(m)
                 new.append(m)
         if new:
-            f = self.sopener('obsstore', 'ab')
+            f = self.svfs('obsstore', 'ab')
             try:
                 offset = f.tell()
                 transaction.add('obsstore', offset)