dirstate: use open/read of vfs(opener) explicitly instead of read
This simplifies changes in subsequent patch, which tries to open
`.pending` file when HG_PENDING environment variable is defined.
--- a/mercurial/dirstate.py Wed May 20 01:06:09 2015 +0900
+++ b/mercurial/dirstate.py Wed May 20 01:06:09 2015 +0900
@@ -326,7 +326,11 @@
self._map = {}
self._copymap = {}
try:
- st = self._opener.read(self._filename)
+ fp = self._opener.open(self._filename)
+ try:
+ st = fp.read()
+ finally:
+ fp.close()
except IOError, err:
if err.errno != errno.ENOENT:
raise