[Unison-hackers] [unison-svn] r288 - in trunk: doc src

Benjamin C. Pierce bcpierce at seas.upenn.edu
Sun Jun 22 08:49:23 EDT 2008


Author: bcpierce
Date: 2008-06-22 08:49:20 -0400 (Sun, 22 Jun 2008)
New Revision: 288

Modified:
   trunk/doc/contactsbody.tex
   trunk/doc/unison-manual.tex
   trunk/src/RECENTNEWS
   trunk/src/copy.ml
   trunk/src/mkProjectInfo.ml
Log:
* Updated documentation to describe new features

* Changed units of copythreshold to kilobytes

* Added -z to flags for external rsync program

Modified: trunk/doc/contactsbody.tex
===================================================================
--- trunk/doc/contactsbody.tex	2008-06-21 16:06:27 UTC (rev 287)
+++ trunk/doc/contactsbody.tex	2008-06-22 12:49:20 UTC (rev 288)
@@ -3,7 +3,10 @@
 Moderated mailing lists are available for bug reporting, announcements
 of new versions, discussions among users, and discussions among
 developers.  See
-\ONEURL{http://www.cis.upenn.edu/\home{bcpierce}/unison/lists.html} for more
+\begin{quote}
+\ONEURL{http://www.cis.upenn.edu/\home{bcpierce}/unison/lists.html} 
+\end{quote}
+for more
 information.
 
 \endinput

Modified: trunk/doc/unison-manual.tex
===================================================================
--- trunk/doc/unison-manual.tex	2008-06-21 16:06:27 UTC (rev 287)
+++ trunk/doc/unison-manual.tex	2008-06-22 12:49:20 UTC (rev 288)
@@ -49,7 +49,7 @@
   \huge {\ifhevea\black\else\bf \fi User Manual and Reference Guide}%
   \ifhevea \\ \else \\[6ex] \fi%
   \LARGE%
-  Version \unisonversion \\ %
+  Version \unisonversion \\[4ex] %
   % \today %
   \large Copyright 1998-2008, Benjamin C. Pierce
   \end{center}%
@@ -2022,6 +2022,39 @@
   rshargs = -C}'' to your profile.  
 
 
+\SUBSECTION{Making Unison Faster on Large Files}{speeding}
+
+Unison's built-in implementation of the rsync algorithm makes transferring
+updates to existing files pretty fast.  However, for whole-file copies, the
+built-in transfer method is not highly optimized.  Also, if Unison is
+interrupted in the middle of transferring a large file, it will attempt to
+retransfer the whole thing on the next run.
+
+These shortcomings can be addressed by telling Unison to use an external
+file copying utility for whole-file transfers.  The recommended one is the
+standalone {\tt rsync} tool, which is available by default on most Unix
+systems and can easily be installed on Windows systems using Cygwin.
+
+If you have {\tt rsync} installed on both hosts, you can make Unison use it
+simply by setting the {\tt copythreshold} flag to something non-negative.
+If you set it to 0, Unison will use the external copy utility for {\em all}
+whole-file transfers.  (This is probably slower than letting Unison copy
+small files by itself, but can be useful for testing.)  If you set it to a
+larger value, Unison will use the external utility for all files larger than
+this size (which is given in kilobytes, so setting it to 1000 will cause the
+external tool to be used for all transfers larger than a megabyte).  
+
+If you want to use a different external copy utility, set the {\tt copyprog}
+preference. 
+
+If a {\em directory} transfer is interrupted, the next run of Unison will
+skip any files that were completely transferred before the interruption.
+Note, though, that the new directory will not appear in the destination
+filesystem until everything has been transferred---partially transferred
+directories are kept in a temporary location (with names like {\tt
+  .unison.DIRNAME....}) until the transfer is complete.  
+
+
 \SUBSECTION{Fast Update Detection}{fastcheck}
 
 If your replicas are large and at least one of them is on a Windows

Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2008-06-21 16:06:27 UTC (rev 287)
+++ trunk/src/RECENTNEWS	2008-06-22 12:49:20 UTC (rev 288)
@@ -1,3 +1,11 @@
+CHANGES FROM VERSION 2.29.3
+
+* Updated documentation to describe new features
+
+* Changed units of copythreshold to kilobytes
+
+* Added -z to flags for external rsync program
+-------------------------------
 CHANGES FROM VERSION 2.29.2
 
 * Automatically supply "user@" in argument to external copy program.

Modified: trunk/src/copy.ml
===================================================================
--- trunk/src/copy.ml	2008-06-21 16:06:27 UTC (rev 287)
+++ trunk/src/copy.ml	2008-06-22 12:49:20 UTC (rev 288)
@@ -477,7 +477,7 @@
 (****)
 
 let copyprog =
-  Prefs.createString "copyprog" "rsync --partial --inplace"
+  Prefs.createString "copyprog" "rsync --partial --inplace --compress"
     "External program for copying large files"
     ("A string giving the name of an "
      ^ "external program that can be used to copy large files efficiently  "
@@ -490,11 +490,13 @@
 let copythreshold =
   Prefs.createInt "copythreshold" (-1)
     "If nonnegative, use copyprog to transfer files larger than this"
-    ("A number indicating above what filesize (in megabytes) Unison should "
+    ("A number indicating above what filesize (in kilobytes) Unison should "
      ^ "use the external "
      ^ "copying utility specified by {\\tt copyprog}. Specifying 0 will cause "
      ^ "{\\em all} copies to use the external program; "
-     ^ "a negative number will prevent any files from using it.  (Default is -1.)")
+     ^ "a negative number will prevent any files from using it.  "
+     ^ "The default is -1.  "
+     ^ "\\sectionref{speeding}{Making Unison Faster on Large Files}")
 
 let tryCopyMovedFileLocal connFrom
             (fspathTo, pathTo, realPathTo, update, desc, fp, ress, id) =
@@ -605,7 +607,7 @@
            Prefs.read copyprog <> ""
         && Prefs.read copythreshold >= 0
         && Props.length desc >= Uutil.Filesize.ofInt64 (Int64.mul
-                                   (Int64.of_int 1000000)
+                                   (Int64.of_int 1000)
                                    (Int64.of_int (Prefs.read copythreshold)))
         && update = `Copy
       then begin

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2008-06-21 16:06:27 UTC (rev 287)
+++ trunk/src/mkProjectInfo.ml	2008-06-22 12:49:20 UTC (rev 288)
@@ -73,3 +73,4 @@
 
 
 
+



More information about the Unison-hackers mailing list