[Unison-hackers] text ui: nothing is logged when there is nothing to propagate

Benjamin C. Pierce bcpierce at cis.upenn.edu
Sat Mar 9 12:36:17 EST 2013


Yes, please go ahead with all of them.  My only tiny comment is that the new preference should be marked "advanced" (by putting a * at the beginning of its long description, IIRC).

   - B

On Mar 9, 2013, at 8:46 AM, Alan Schmitt <alan.schmitt at polytechnique.org> wrote:

> Benjamin C. Pierce writes:
> 
>>> I've noticed that, with the text ui, nothing is written to the log when
>>> there is nothing to propagate, even if there were some problems or
>>> conflicts.
>>> 
>>> Do you think it's reasonable to print something to the log if skipped >
>>> 0 in this case?
>> 
>> Yes, this seems good.
> 
> Here is a proposed patch for this. I duplicate the printing code, as I
> did not find a clean way to factorize it.
> 
> Please let me know if I should commit this patch and the earlier ones as
> well.
> 
> Alan
> 
> diff --git a/src/uitext.ml b/src/uitext.ml
> index 5fca0d9..30a428b 100644
> --- a/src/uitext.ml
> +++ b/src/uitext.ml
> @@ -604,6 +604,19 @@ let rec interactAndPropagateChanges reconItemList
>     if !Update.foundArchives && Prefs.read Uicommon.repeat = "" then
>       Update.commitUpdates ();
>     display "No updates to propagate\n";
> +    if skipped > 0 then
> +      Safelist.iter
> +        (fun ri ->
> +         match ri.replicas with
> +           Problem p ->
> +           Trace.log (Printf.sprintf "[ERROR] Skipping %s\n  %s\n"
> +                                     (Path.toString ri.path1) p)
> +         | Different {rc1 = _; rc2 = _; direction = Conflict c; default_direction = _} ->
> +            Trace.log (Printf.sprintf "[CONFLICT] Skipping %s\n  %s\n"
> +                                      (Path.toString ri.path1) c)
> +         | _ -> ()
> +        )
> +        newReconItemList;
>     (skipped > 0, false, false, [])
>   end else if proceed=ProceedImmediately then begin
>     doit()
> _______________________________________________
> Unison-hackers mailing list
> Unison-hackers at lists.seas.upenn.edu
> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers



More information about the Unison-hackers mailing list