diff -r 4277e20cfec4 -r e10adebf8176 mercurial/vfs.py --- 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)))