[Unison-hackers] [unison-svn] r324 - branches/2.32/src

Benjamin C. Pierce bcpierce at seas.upenn.edu
Sat May 2 20:19:31 EDT 2009


Author: bcpierce
Date: 2009-05-02 20:19:28 -0400 (Sat, 02 May 2009)
New Revision: 324

Modified:
   branches/2.32/src/NEWS
   branches/2.32/src/RECENTNEWS
   branches/2.32/src/mkProjectInfo.ml
   branches/2.32/src/strings.ml
   branches/2.32/src/update.ml
Log:
* Backed out last month's change to progress reporting during update
  detection: in the text UI, it prints annoyingly many files; in the
  GUI, it makes the progress bar race back and forth too fast.  Better
  the way it was.  




Modified: branches/2.32/src/NEWS
===================================================================
--- branches/2.32/src/NEWS	2009-05-02 02:47:40 UTC (rev 323)
+++ branches/2.32/src/NEWS	2009-05-03 00:19:28 UTC (rev 324)
@@ -1,5 +1,5 @@
 
-Changes in Version 2.32.9
+Changes in Version 2.32.10
 
    Changes since 2.31:
      * Small user interface changes

Modified: branches/2.32/src/RECENTNEWS
===================================================================
--- branches/2.32/src/RECENTNEWS	2009-05-02 02:47:40 UTC (rev 323)
+++ branches/2.32/src/RECENTNEWS	2009-05-03 00:19:28 UTC (rev 324)
@@ -1,3 +1,13 @@
+CHANGES FROM VERSION 2.32.10
+
+* Backed out last month's change to progress reporting during update
+  detection: in the text UI, it prints annoyingly many files; in the
+  GUI, it makes the progress bar race back and forth too fast.  Better
+  the way it was.  
+
+
+
+-------------------------------
 CHANGES FROM VERSION 2.32.9
 
 * Fix copyright date in manual

Modified: branches/2.32/src/mkProjectInfo.ml
===================================================================
--- branches/2.32/src/mkProjectInfo.ml	2009-05-02 02:47:40 UTC (rev 323)
+++ branches/2.32/src/mkProjectInfo.ml	2009-05-03 00:19:28 UTC (rev 324)
@@ -106,3 +106,4 @@
 
 
 
+

Modified: branches/2.32/src/strings.ml
===================================================================
--- branches/2.32/src/strings.ml	2009-05-02 02:47:40 UTC (rev 323)
+++ branches/2.32/src/strings.ml	2009-05-03 00:19:28 UTC (rev 324)
@@ -4,7 +4,7 @@
 let docs =
     ("about", ("About Unison", 
      "Unison File Synchronizer\n\
-      Version 2.32.9\n\
+      Version 2.32.10\n\
       \n\
       "))
 ::
@@ -2582,8 +2582,8 @@
       \n\
       "))
 ::
-    ("news", ("Changes in Version 2.32.9", 
-     "Changes in Version 2.32.9\n\
+    ("news", ("Changes in Version 2.32.10", 
+     "Changes in Version 2.32.10\n\
       \n\
       \032  Changes since 2.31:\n\
       \032    * Small user interface changes\n\

Modified: branches/2.32/src/update.ml
===================================================================
--- branches/2.32/src/update.ml	2009-05-02 02:47:40 UTC (rev 323)
+++ branches/2.32/src/update.ml	2009-05-03 00:19:28 UTC (rev 324)
@@ -1002,56 +1002,57 @@
 
 (** Status display **)
 
-(* BCP (3/09) We used to try to be smart about showing status messages
-   at regular intervals, but people seem to find this confusing.
-   Let's replace all this with something simpler -- just show directories as
-   they are scanned...  (but I'll leave the code in for now, in case we find
-   we want to restore the old behavior). *)
-(*
-  let bigFileLength = 10 * 1024
-  let bigFileLengthFS = Uutil.Filesize.ofInt bigFileLength
-  let smallFileLength = 1024
-  let fileLength = ref 0
-  let t0 = ref 0.
+let bigFileLength = 10 * 1024
+let bigFileLengthFS = Uutil.Filesize.ofInt bigFileLength
+let smallFileLength = 1024
+let fileLength = ref 0
+let t0 = ref 0.
 
-  (* Note that we do *not* want to do any status displays from the server
-     side, since this will cause the server to block until the client has
-     finished its own update detection and can receive and acknowledge
-     the status display message -- thus effectively serializing the client 
-     and server! *)
-  let showStatusAddLength info =
-    if not !Trace.runningasserver then begin
-      let len1 = Props.length info.Fileinfo.desc in
-      let len2 = Osx.ressLength info.Fileinfo.osX.Osx.ressInfo in
-      if len1 >= bigFileLengthFS || len2 >= bigFileLengthFS then
-        fileLength := bigFileLength
-      else
-        fileLength :=
-          min bigFileLength
-           (!fileLength + Uutil.Filesize.toInt len1 + Uutil.Filesize.toInt len2)
-    end
+(* Note that we do *not* want to do any status displays from the server
+   side, since this will cause the server to block until the client has
+   finished its own update detection and can receive and acknowledge
+   the status display message -- thus effectively serializing the client 
+   and server! *)
+let showStatusAddLength info =
+  if not !Trace.runningasserver then begin
+    let len1 = Props.length info.Fileinfo.desc in
+    let len2 = Osx.ressLength info.Fileinfo.osX.Osx.ressInfo in
+    if len1 >= bigFileLengthFS || len2 >= bigFileLengthFS then
+      fileLength := bigFileLength
+    else
+      fileLength :=
+        min bigFileLength
+         (!fileLength + Uutil.Filesize.toInt len1 + Uutil.Filesize.toInt len2)
+  end
 
-  let showStatus path =
-    if not !Trace.runningasserver then begin
-      fileLength := !fileLength + smallFileLength;
-      if !fileLength >= bigFileLength then begin
-        fileLength := 0;
-        let t = Unix.gettimeofday () in
-        if t -. !t0 > 0.05 then begin
-          Trace.statusDetail ("scanning... got to " ^ Path.toString path);
-          t0 := t
-        end
+let showStatus path =
+  if not !Trace.runningasserver then begin
+    fileLength := !fileLength + smallFileLength;
+    if !fileLength >= bigFileLength then begin
+      fileLength := 0;
+      let t = Unix.gettimeofday () in
+      if t -. !t0 > 0.05 then begin
+        Trace.statusDetail ("scanning... " ^ Path.toString path);
+        t0 := t
       end
     end
-*)
+  end
 
+let showStatusDir path = ()
+
+(* BCP (4/09) The code above tries to be smart about showing status messages
+   at regular intervals, but people seem to find this confusing.
+   I tried replace all this with something simpler -- just show directories as
+   they are scanned -- but this seems worse: it prints far too much stuff.
+   So I'm going to revert to the old version. *)
+(*
 let showStatus path = ()
 let showStatusAddLength info = ()
-
 let showStatusDir path =
   if not !Trace.runningasserver then begin
         Trace.statusDetail ("scanning... " ^ Path.toString path);
   end
+*)
 
 (* ------- *)
 



More information about the Unison-hackers mailing list