mercurial/vfs.py
changeset 40989 e10adebf8176
parent 40796 03bca908d9fb
parent 40939 8d9f366b7f19
child 41090 c8006a25b845
--- a/mercurial/vfs.py	Mon Dec 17 15:05:52 2018 +0100
+++ b/mercurial/vfs.py	Tue Dec 18 10:21:25 2018 -0500
@@ -525,7 +525,8 @@
         return delattr(self._origfh, attr)
 
     def __enter__(self):
-        return self._origfh.__enter__()
+        self._origfh.__enter__()
+        return self
 
     def __exit__(self, exc_type, exc_value, exc_tb):
         raise NotImplementedError('attempted instantiating ' + str(type(self)))