monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone, net.venge.monotone.issue-14


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone, net.venge.monotone.issue-148-80: f6bdc2765a5efcf5944f1b59c7d10ba057ddd9b6
Date: Sun, 8 Jul 2012 19:54:22 +0200 (CEST)

revision:            f6bdc2765a5efcf5944f1b59c7d10ba057ddd9b6
date:                2012-07-08T17:53:02
author:              address@hidden
branch:              net.venge.monotone
branch:              net.venge.monotone.issue-148-80
changelog:
* src/win32/fs.cc (do_remove_recursive): non-existing file on Windows 7

* INSTALL_windows_native.txt: improve

* test/func/ls_unknown/__driver__.lua: add test files; now passing

manifest:
format_version "1"

new_manifest [04a3b3c908e8046437c817562e1c80ff645b2dc0]

old_revision [b1401f6a1beba4ef0e985c82f48f1aefd97f6969]

patch "INSTALL_windows_native.txt"
 from [a2eb4d25afc4f28d95fd62756e6527aab3ac88fa]
   to [890ae02b8d52b803a093cfa38c267de4955f3943]

patch "src/win32/fs.cc"
 from [e524671f74e0644fb08b16e3535fe00f80106328]
   to [7fe5820033df2ee964aad6ed906dde92d4d46397]

patch "test/func/ls_unknown/__driver__.lua"
 from [9d93f6269c8226027853044ebad48c5d4ca432b1]
   to [db94178a695f12c74d0c083a83a3ead65ea257b7]
============================================================
--- INSTALL_windows_native.txt	a2eb4d25afc4f28d95fd62756e6527aab3ac88fa
+++ INSTALL_windows_native.txt	890ae02b8d52b803a093cfa38c267de4955f3943
@@ -80,30 +80,31 @@
 02. MinGW
   Run mingw-get-inst-20110211.exe - note that later versions include
   g++ 4.6.2, which is broken for C++ exceptions on MinGW.
+  Do _not_ update the catalog; use the built-in catalog, to insure the
+  binaries are consistent with the g++ 4.5.2 runtime.
   At the "Select Components" screen, add:
     C++ compiler
     MinGW Developer Toolkit
   Other than this, accept all defaults.
-  In particular, do _not_ update the catalog; use the built-in
-  catalog, to insure the binaries are consistent with the g++ 4.5.2
-  runtime.
   Open the MinGW shell (Start->All Programs->MinGW->MinGW Shell)
   Run the following:
   $ mingw-get install msys-autoconf msys-automake
   $ mingw-get install mingw32-zlib mingw32-libz-dev mingw32-gettext
 
 03. boost; only need headers
+  in MinGW shell:
   $ cd /usr
   $ mkdir src
   $ cd src
   $ tar -jxf ../boost_1_49_0.tar.bz2
-  This may give errors about gid_t out of range, and then say
+  This may give errors about a value out of gid_t range, and then say
   "Exiting with failure status due to previous errors"; you can
   ignore this.
   $ cd boost_1_49_0
   $ cp -a boost /mingw/include
 
 04. Lua
+  in MinGW shell:
    $ cd /usr/src
    $ tar -zxf ../lua-5.20.tar.gz
    $ cd lua-5.2.0
@@ -121,12 +122,18 @@
    $ cd /usr/src
    $ tar -zxf ../Botan-1.10.1.tgz
    $ cd Botan-1.10.1
-   $ ./configure.py --cc=gcc --os=mingw
+
+   On a 64 bit machine, configure will default to 64 bit compilation
+   options. However, some Botan source files do not yet support 64
+   bits. So force 32 bits.
+   $ ./configure.py --cc=gcc --os=mingw --cpu=x86_32
+
    The Botan configure script generates paths with Python's
    os.path.join(...), which in the case of the Windows Python
    we installed uses '\' as the path separator. There are a
    couple of places in the Makefile where this causes problems.
    $ sed -i 's#\\\(.\)#/\1#g' Makefile
+
    $ make install
 
 07. sqlite3
============================================================
--- src/win32/fs.cc	e524671f74e0644fb08b16e3535fe00f80106328
+++ src/win32/fs.cc	7fe5820033df2ee964aad6ed906dde92d4d46397
@@ -255,6 +255,20 @@ do_remove_recursive(std::string const & 
   //
   // SHFileOperation makes the weird requirement that its pFrom (and pTo)
   // arguments be terminated with *two* ASCII NULs.
+
+  // http://msdn.microsoft.com/en-us/library/bb762164(VS.85).aspx
+  // warns that the return codes from SHFileOperation are *not* normal
+  // Win32 error codes; so we don't try to do os_strerror on them.
+  //
+  // 0x402 is "unknown error"; it occurs for a non-existing path, which is
+  // not an error in this function. It also occurs for other problems, like
+  // '/' as a directory separator. Sigh.
+  //
+  // On Windows 7, a non-existing path returns some other error.
+  // So we check for an existing path first.
+  if (get_path_status(path) == path::nonexistent)
+    return;
+
   size_t pfLen = path.size();
   LPSTR pFrom = (LPSTR)malloc(pfLen + 2);
   memcpy(pFrom, path.data(), pfLen);
@@ -280,14 +294,7 @@ do_remove_recursive(std::string const & 
   op.lpszProgressTitle = NULL;
 
   int rc = SHFileOperationA(&op);
-  // http://msdn.microsoft.com/en-us/library/bb762164(VS.85).aspx
-  // warns that the return codes from SHFileOperation are *not* normal
-  // Win32 error codes; so we don't try to do os_strerror on them.
-  //
-  // 0x402 is "unknown error"; it occurs for a non-existing path, which is
-  // not an error in this function. It also occurs for other problems, like
-  // '/' as a directory separator. Sigh.
-  E(rc == 0 || rc == 0x402, origin::system,
+  E(rc == 0, origin::system,
     F("could not remove '%s' and contents: SHFileOperation error code 0x%x")
     % path % rc);
   E(!op.fAnyOperationsAborted, origin::system,
============================================================
--- test/func/ls_unknown/__driver__.lua	9d93f6269c8226027853044ebad48c5d4ca432b1
+++ test/func/ls_unknown/__driver__.lua	db94178a695f12c74d0c083a83a3ead65ea257b7
@@ -13,7 +13,8 @@ check(samelines("stdout",
 {"bar",
  "emptyhomedir",
  "foo",
- "min_hooks.lua"}))
+ "min_hooks.lua",
+ "tester.log"}))
 
 -- Doesn't show contents of unknown directory, even when the directory is specified
 check(mtn("ls", "unknown", "foo"), 0, true, nil)
@@ -26,6 +27,8 @@ check(samelines("stdout",
 {"bar",
  "emptyhomedir",
  "foo",
- "min_hooks.lua"}))
+ "min_hooks.lua",
+ "stdout",
+ "tester.log"}))
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]