[Unison-hackers] [unison-svn] r315 - trunk/src

Benjamin C. Pierce bcpierce at seas.upenn.edu
Wed Jan 14 22:30:49 EST 2009


Author: bcpierce
Date: 2009-01-14 22:30:46 -0500 (Wed, 14 Jan 2009)
New Revision: 315

Modified:
   trunk/src/Makefile.OCaml
   trunk/src/NEWS
   trunk/src/RECENTNEWS
   trunk/src/TODO.txt
   trunk/src/copy.ml
   trunk/src/mkProjectInfo.ml
   trunk/src/strings.ml
   trunk/src/update.ml
Log:
* Applied a patch from Karl M to make the GTK2 version build with
  OCaml 3.11 on Windows.

* Don't use shortcuts or external copy programs to transfer
  zero-length files (to avoid confusing status messages about
  shortcut-copying completely unrelated files that happen to also have
  zero length!).








Modified: trunk/src/Makefile.OCaml
===================================================================
--- trunk/src/Makefile.OCaml	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/Makefile.OCaml	2009-01-15 03:30:46 UTC (rev 315)
@@ -91,8 +91,15 @@
   EXEC_EXT=.exe
   OBJ_EXT=.obj
   CWD=.
-  CLIBS+=-cclib win32rc/unison.res
-  STATICLIBS+=-cclib win32rc/unison.res
+#  Fix suggested by Karl M, Jan 2009:
+#    "The new flexlink wrapper that OCaml 3.11 uses was gagging on the res
+#    file. So the res file has to be passed through flexlink untouched to
+#    the linker.  I only touched the MSVC side, but mingw may have the same
+#    issue."
+#  CLIBS+=-cclib win32rc/unison.res
+#  STATICLIBS+=-cclib win32rc/unison.res
+  CLIBS+=-cclib "-link win32rc/unison.res"
+  STATICLIBS+=-cclib "-link win32rc/unison.res"
   buildexecutable::
 	@echo Building for Windows
 else

Modified: trunk/src/NEWS
===================================================================
--- trunk/src/NEWS	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/NEWS	2009-01-15 03:30:46 UTC (rev 315)
@@ -1,5 +1,5 @@
 
-Changes in Version 2.31.4
+Changes in Version 2.32.1
 
    Changes since 2.17:
      * Major rewrite and cleanup of the whole Mac OS X graphical user

Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/RECENTNEWS	2009-01-15 03:30:46 UTC (rev 315)
@@ -1,3 +1,20 @@
+CHANGES FROM VERSION 2.32.1
+
+* Applied a patch from Karl M to make the GTK2 version build with
+  OCaml 3.11 on Windows.
+
+* Don't use shortcuts or external copy programs to transfer
+  zero-length files (to avoid confusing status messages about
+  shortcut-copying completely unrelated files that happen to also have
+  zero length!).
+
+
+
+
+
+
+
+-------------------------------
 CHANGES FROM VERSION 2.32.0
 
 * Bumped version number to reflect newly added preference

Modified: trunk/src/TODO.txt
===================================================================
--- trunk/src/TODO.txt	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/TODO.txt	2009-01-15 03:30:46 UTC (rev 315)
@@ -17,6 +17,7 @@
      - The function that runs the external program should not grab stdin /
        stdout / stderr if Unison is running with the text UI. 
      - The confirmation step should offer to display the new merged file.
+     - (There are some older merge issues documented below)
 
 * Makefile for fstest
 
@@ -87,6 +88,15 @@
 **** When deleting a directory, we should *not* skip over Unison temp files
      in the process of listing children
 
+*** Un-writeable directories can't be copied.
+    The 'rename' operation at the end of Files.copy will fail (at least on
+    OSX) if the path being renamed points to a directory and that directory
+    (not the one containing it!) is not writeable by the user.  To fix this,
+    we'd need to notice when we are renaming a directory and temporarily
+    make it writeable just before the rename and then make it what it should
+    be just after.  But I don't feel like writing this bit of code right
+    now, to handle such a corner case.  [BCP, November 2008]
+
 *** make the ETA bar show which file is actually transferring bytes at the
     moment
 

Modified: trunk/src/copy.ml
===================================================================
--- trunk/src/copy.ml	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/copy.ml	2009-01-15 03:30:46 UTC (rev 315)
@@ -671,9 +671,11 @@
       end else if
            Prefs.read copyprog <> ""
         && Prefs.read copythreshold >= 0
-        && Props.length desc >= Uutil.Filesize.ofInt64
-                                   (Int64.mul (Int64.of_int 1000)
-                                     (Int64.of_int (Prefs.read copythreshold)))
+        && Props.length desc >= Uutil.Filesize.ofInt64 (Int64.of_int 1)
+        && Props.length desc >=
+             Uutil.Filesize.ofInt64
+               (Int64.mul (Int64.of_int 1000)
+                  (Int64.of_int (Prefs.read copythreshold)))
         && update = `Copy
       then begin
         (* First use the external program to copy the data fork *)

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/mkProjectInfo.ml	2009-01-15 03:30:46 UTC (rev 315)
@@ -99,3 +99,4 @@
 
 
 
+

Modified: trunk/src/strings.ml
===================================================================
--- trunk/src/strings.ml	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/strings.ml	2009-01-15 03:30:46 UTC (rev 315)
@@ -4,7 +4,7 @@
 let docs =
     ("about", ("About Unison", 
      "Unison File Synchronizer\n\
-      Version 2.31.4\n\
+      Version 2.32.1\n\
       \n\
       "))
 ::
@@ -1148,9 +1148,12 @@
       \032-contactquietly    suppress the 'contacting server' message during startup\n\
       \032-copyprog xxx      external program for copying large files\n\
       \032-copyprogrest xxx  variant of copyprog for resuming partial transfers\n\
+      \032-copyquoterem xxx  add quotes to remote file name for copyprog (true/false/def\n\
+      ault)\n\
       \032-copythreshold n   use copyprog on files bigger than this (if >=0, in Kb)\n\
       \032-debug xxx         debug module xxx ('all' -> everything, 'verbose' -> more)\n\
       \032-diff xxx          command for showing differences between files\n\
+      \032-dontchmod         When set, never use the chmod system call\n\
       \032-dumbtty           do not change terminal settings in text UI (default true)\n\
       \032-fastcheck xxx     do fast update detection (true/false/default)\n\
       \032-forcepartial xxx  add a pattern to the forcepartial list\n\
@@ -1263,6 +1266,11 @@
       \032         prefix; if it does not appear anywhere in the prefix or the\n\
       \032         suffix, it will be automatically placed at the beginning of the\n\
       \032         suffix.\n\
+      \032         One thing to be careful of: If the backuploc preference is set\n\
+      \032         to local, Unison will automatically ignore all files whose\n\
+      \032         prefix and suffix match backupprefix and backupsuffix. So be\n\
+      \032         careful to choose values for these preferences that are\n\
+      \032         sufficiently different from the names of your real files.\n\
       \032  backups \n\
       \032         Setting this flag to true is equivalent to setting\n\
       \032         backuplocation to local and backup to Name *.\n\
@@ -1305,6 +1313,14 @@
       \032         will just be copyprog with one extra option (e.g., -partial,\n\
       \032         for rsync). The default setting invokes rsync with appropriate\n\
       \032         options--most users should not need to change it.\n\
+      \032  copyquoterem xxx\n\
+      \032         When set to true, this flag causes Unison to add an extra layer\n\
+      \032         of quotes to the remote path passed to the external copy\n\
+      \032         program. This is needed by rsync, for example, which internally\n\
+      \032         uses an ssh connection requiring an extra level of quoting for\n\
+      \032         paths containing spaces. When this flag is set to default,\n\
+      \032         extra quotes are added if the value of copyprog contains the\n\
+      \032         string rsync.\n\
       \032  copythreshold n\n\
       \032         A number indicating above what filesize (in kilobytes) Unison\n\
       \032         should use the external copying utility specified by copyprog.\n\
@@ -1341,6 +1357,12 @@
       \032         exactly the same information as the printed and HTML manuals,\n\
       \032         modulo formatting. Use -doc topics to obtain a list of the\n\
       \032         names of the various sections that can be printed.\n\
+      \032  dontchmod \n\
+      \032         By default, Unison uses the 'chmod' system call to set the\n\
+      \032         permission bits of files after it has copied them. But in some\n\
+      \032         circumstances (and under some operating systems), the chmod\n\
+      \032         call always fails. Setting this preference completely prevents\n\
+      \032         Unison from ever calling chmod.\n\
       \032  dumbtty \n\
       \032         When set to true, this flag makes the text mode user interface\n\
       \032         avoid trying to change any of the terminal settings. (Normally,\n\
@@ -2560,8 +2582,8 @@
       \n\
       "))
 ::
-    ("news", ("Changes in Version 2.31.4", 
-     "Changes in Version 2.31.4\n\
+    ("news", ("Changes in Version 2.32.1", 
+     "Changes in Version 2.32.1\n\
       \n\
       \032  Changes since 2.17:\n\
       \032    * Major rewrite and cleanup of the whole Mac OS X graphical user\n\

Modified: trunk/src/update.ml
===================================================================
--- trunk/src/update.ml	2008-12-01 14:00:40 UTC (rev 314)
+++ trunk/src/update.ml	2009-01-15 03:30:46 UTC (rev 315)
@@ -21,6 +21,8 @@
   format is modified (see file props.ml for the new function) *)
 (*FIX: also change Fileinfo.stamp to drop the info.ctime component, next time the
   format is modified *)
+(*FIX: also make Jerome's suggested change about file times (see his mesg in
+       unison-pending email folder). *)
 let archiveFormat = 22
 
 module NameMap = MyMap.Make (Name)



More information about the Unison-hackers mailing list