mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
6ad31bbf6a
Summary: `util.fdopen` now adds workarounds for read+write+seek files on Windows. This should solve issues we have seen on Windows behaviors. See https://www.mercurial-scm.org/repo/hg/rev/3686fa2b8eee for the Windows weirdness. Here is a minimal program to reproduce the weirdness: ``` import os f = open("a.txt", "wb+") # Write 12 bytes f.write(b"b" * 12) # Read byte slice 2..5 f.seek(2, os.SEEK_SET) data = f.read(3) # Try SEEK_END f.seek(0, os.SEEK_END) print("%d (expect 12)" % f.tell()) # got 5 using some python.exe ``` Reviewed By: xavierd Differential Revision: D16033678 fbshipit-source-id: 4f17c463d9bfcc0cdd38d1b15f2a9e38e5b4c132 |
||
---|---|---|
.. | ||
__init__.py | ||
bzr.py | ||
common.py | ||
convcmd.py | ||
darcs.py | ||
filemap.py | ||
git.py | ||
gnuarch.py | ||
hg.py | ||
p4.py | ||
subversion.py | ||
transport.py |