Re: text ui: nothing is logged when there is nothing to propagate

"Benjamin C. Pierce" <[email protected]>
Newsgroups gmane.network.unison.devel
Message-ID <[email protected]>
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 <[email protected]> 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
> [email protected]
> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.