changeset 31215:15c998528c36

fsmonitor: remove use of repo.opener This has been deprecated, so we need to switch to the appropriate vfs apis.
author Durham Goode <durham@fb.com>
date Tue, 07 Mar 2017 12:52:00 -0800
parents 167b69ccc62c
children 21fa3d3688f3
files hgext/fsmonitor/state.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fsmonitor/state.py	Tue Feb 28 15:19:08 2017 +0100
+++ b/hgext/fsmonitor/state.py	Tue Mar 07 12:52:00 2017 -0800
@@ -20,7 +20,7 @@
 
 class state(object):
     def __init__(self, repo):
-        self._opener = repo.opener
+        self._vfs = repo.vfs
         self._ui = repo.ui
         self._rootdir = pathutil.normasprefix(repo.root)
         self._lastclock = None
@@ -33,7 +33,7 @@
 
     def get(self):
         try:
-            file = self._opener('fsmonitor.state', 'rb')
+            file = self._vfs('fsmonitor.state', 'rb')
         except IOError as inst:
             if inst.errno != errno.ENOENT:
                 raise
@@ -91,7 +91,7 @@
             return
 
         try:
-            file = self._opener('fsmonitor.state', 'wb', atomictemp=True)
+            file = self._vfs('fsmonitor.state', 'wb', atomictemp=True)
         except (IOError, OSError):
             self._ui.warn(_("warning: unable to write out fsmonitor state\n"))
             return