fsmonitor: remove use of repo.opener
This has been deprecated, so we need to switch to the appropriate vfs apis.
--- 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