# HG changeset patch
# User Matt Mackall <mpm@selenic.com>
# Date 2008-01-30 23:30:34
# Node ID 0973501e5f4a4c3fe02721c376c5d371e5b7bc3c
# Parent  e495f3f35b2d8f0aa825519a323061711542be50

win32: remove excessive flushing

Our Windows file code was flushing buffers from the operating system
to disk, rather than from the application to the operating system.

diff --git a/mercurial/util_win32.py b/mercurial/util_win32.py
--- a/mercurial/util_win32.py
+++ b/mercurial/util_win32.py
@@ -294,10 +294,8 @@ class posixfile_nt(object):
             self.closed = True
 
     def flush(self):
-        try:
-            win32file.FlushFileBuffers(self.handle)
-        except pywintypes.error, err:
-            raise WinIOError(err)
+        # we have no application-level buffering
+        pass
 
     def truncate(self, pos=0):
         try: