[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1899-g3fc1c0c

Brad King brad.king at kitware.com
Mon Feb 4 15:15:11 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  3fc1c0c005fbafc2d7858b542a1f91ea270ea661 (commit)
       via  80c52f337a1d1f14f6da540be623a6ed7c4ef7eb (commit)
      from  9c3ae36dcc572532e1e9c171cec41a04d9c4c580 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fc1c0c005fbafc2d7858b542a1f91ea270ea661
commit 3fc1c0c005fbafc2d7858b542a1f91ea270ea661
Merge: 9c3ae36 80c52f3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 4 15:15:09 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 4 15:15:09 2013 -0500

    Merge topic 'fix-atomic-rename-on-Windows' into next
    
    80c52f3 Fix cmSystemTools::RenameFile delay on Windows


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80c52f337a1d1f14f6da540be623a6ed7c4ef7eb
commit 80c52f337a1d1f14f6da540be623a6ed7c4ef7eb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 4 15:10:28 2013 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 4 15:10:28 2013 -0500

    Fix cmSystemTools::RenameFile delay on Windows
    
    The parent commit made RenameFile more robust on Windows by trying a few
    times after failure and a delay between tries.  This introduced a major
    slow down by delaying/trying a long time even in cases that will never
    succeed.  Instead try again only if the failure may be temporary.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 1aa6486..525efb4 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1190,6 +1190,11 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
   int tries = 5;
   while(!MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING) && --tries)
     {
+    // Try again only if failure was due to access permissions.
+    if(GetLastError() != ERROR_ACCESS_DENIED)
+      {
+      return false;
+      }
     DWORD attrs = GetFileAttributes(newname);
     if((attrs != INVALID_FILE_ATTRIBUTES) &&
        (attrs & FILE_ATTRIBUTE_READONLY))

-----------------------------------------------------------------------

Summary of changes:
 Source/cmSystemTools.cxx |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list