# HG changeset patch # User Matt Harbison <matt_harbi...@yahoo.com> # Date 1544899294 18000 # Sat Dec 15 13:41:34 2018 -0500 # Node ID d40ef8f0cd2cce5b41e48924fc2a3d486b4c534d # Parent 068910232e124a50a13fd7444844d9151db48d6b windows: ensure mixedfilemodewrapper fd doesn't escape by entering context mgr
Otherwise it seems that the special read and write handling would be bypassed. diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -70,7 +70,8 @@ class mixedfilemodewrapper(object): object.__setattr__(self, r'_lastop', 0) def __enter__(self): - return self._fp.__enter__() + self._fp.__enter__() + return self def __exit__(self, exc_type, exc_val, exc_tb): self._fp.__exit__(exc_type, exc_val, exc_tb) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel