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

schmitta at seas.upenn.edu schmitta at seas.upenn.edu
Mon Mar 11 04:41:50 EDT 2013


Author: schmitta
Date: 2013-03-11 04:41:50 -0400 (Mon, 11 Mar 2013)
New Revision: 522

Modified:
   trunk/src/RECENTNEWS
   trunk/src/mkProjectInfo.ml
   trunk/src/uitext.ml
Log:
Log conflicts and problems in the text UI even if nothing is propagated.

Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2013-03-11 08:41:44 UTC (rev 521)
+++ trunk/src/RECENTNEWS	2013-03-11 08:41:50 UTC (rev 522)
@@ -1,3 +1,13 @@
+CHANGES FROM VERSION 2.46.13
+
+* Log conflicts and problems in the text UI even if nothing is propagated.
+* Added a string to the Conflict direction to document the reason of
+  the conflict. The text UI has been adapted to this change, the other
+  UIs need to be modified.
+* Adding the maxsizethreshold option which prevents the transfer of
+  files larger than the size specified (in Kb)
+
+-------------------------------
 CHANGES FROM VERSION 2.46.12
 
 * File system monitoring: the file watcher now fails when unable to

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2013-03-11 08:41:44 UTC (rev 521)
+++ trunk/src/mkProjectInfo.ml	2013-03-11 08:41:50 UTC (rev 522)
@@ -89,3 +89,4 @@
 
 
 
+

Modified: trunk/src/uitext.ml
===================================================================
--- trunk/src/uitext.ml	2013-03-11 08:41:44 UTC (rev 521)
+++ trunk/src/uitext.ml	2013-03-11 08:41:50 UTC (rev 522)
@@ -578,9 +578,12 @@
     if skipped>0 then
       Safelist.iter
         (fun ri ->
-        if problematic ri then
-          alwaysDisplayAndLog
-            ("  skipped: " ^ (Path.toString ri.path1)))
+         match ri.replicas with
+           Problem r
+         | Different {rc1 = _; rc2 = _; direction = Conflict r; default_direction = _} ->
+            alwaysDisplayAndLog (Printf.sprintf "  skipped: %s (%s)"
+                                                (Path.toString ri.path1) r)
+         | _ -> ())
         newReconItemList;
     if partials>0 then
       Safelist.iter
@@ -604,6 +607,25 @@
     if !Update.foundArchives && Prefs.read Uicommon.repeat = "" then
       Update.commitUpdates ();
     display "No updates to propagate\n";
+    if skipped > 0 then begin
+      let summary =
+        Printf.sprintf
+          "Synchronization complete at %s  (0 item transferred, %d skipped, 0 failed)"
+          (let tm = Util.localtime (Util.time()) in
+           Printf.sprintf "%02d:%02d:%02d"
+                          tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec)
+          skipped in
+      Trace.log (summary ^ "\n");
+      Safelist.iter
+        (fun ri ->
+         match ri.replicas with
+           Problem r
+         | Different {rc1 = _; rc2 = _; direction = Conflict r; default_direction = _} ->
+            alwaysDisplayAndLog (Printf.sprintf "  skipped: %s (%s)"
+                                                (Path.toString ri.path1) r)
+         | _ -> ())
+        newReconItemList
+      end;
     (skipped > 0, false, false, [])
   end else if proceed=ProceedImmediately then begin
     doit()



More information about the Unison-hackers mailing list