mercurial/windows.py
changeset 31891 87f293edabb6
parent 31644 f80d9ddc40f3
child 32208 d74b0cff94a9
child 33635 e10745311406
--- a/mercurial/windows.py	Tue Apr 11 18:31:40 2017 -0700
+++ b/mercurial/windows.py	Tue Apr 11 21:38:11 2017 -0400
@@ -64,6 +64,12 @@
         object.__setattr__(self, r'_fp', fp)
         object.__setattr__(self, r'_lastop', 0)
 
+    def __enter__(self):
+        return self._fp.__enter__()
+
+    def __exit__(self, exc_type, exc_val, exc_tb):
+        self._fp.__exit__(exc_type, exc_val, exc_tb)
+
     def __getattr__(self, name):
         return getattr(self._fp, name)