On Thu, May 16, 2002 at 12:23:17PM +0200, Dick Streefland
wrote:> The attached patch makes two changes to the behavior of the -v option:
>
> 1) The initial "building file list ... done" and the last two
lines
> with transfer statistics are moved to verbose level 2, which means
> that you have to specify -vv to see them. When I use -v, I only want
> to see which files are being updated.
I'm afraid we've got too much history behind the current way to change
that now. Undoubtedly there's lots of scripts around that expect the
current behavior. The --log-format option is intended for situations
like yours. Try "--log-format %f". If the log-format option
isn't
flexible enough for what you want, a patch to it is much more likely
to be accepted, especially if it is upward compatible.
> Perhaps the statistics could be controlled by a separate option, so
> that you can display statistics without the list of files.
It already comes out with the --stats option.
> 2) The message "<file> is newer" when you use the -u option
is moved to
> verbose level 1. I think that it is usefull to report newer files
> when you use a single -v option. It is also consistent with the
> warning messages generated by "rdist -y".
That one seems reasonable to me (although I'd just use "if
(verbose)").
It will be up to Martin Pool to decide though.
- Dave Dykstra
> --
> Dick Streefland //// Altium Software BV
> dick.streefland@altium.nl (@ @) http://www.altium.com
> --------------------------------oOO--(_)--OOo---------------------------
> --- rsync-2.5.5/flist.c.orig Thu Mar 14 22:20:20 2002
> +++ rsync-2.5.5/flist.c Tue May 14 16:36:33 2002
> @@ -72,7 +72,7 @@
>
> static int show_filelist_p(void)
> {
> - return verbose && recurse && !am_server;
> + return verbose > 1 && recurse && !am_server;
> }
>
> static void start_filelist_progress(char *kind)
> --- rsync-2.5.5/main.c.orig Wed Mar 27 06:10:44 2002
> +++ rsync-2.5.5/main.c Tue May 14 16:38:06 2002
> @@ -118,7 +118,7 @@
> (double)stats.total_read);
> }
>
> - if (verbose || do_stats) {
> + if (verbose > 1 || do_stats) {
> rprintf(FINFO,"wrote %.0f bytes read %.0f bytes %.2f
bytes/sec\n",
> (double)stats.total_written,
> (double)stats.total_read,
> --- rsync-2.5.5/generator.c.orig Mon Mar 25 06:54:31 2002
> +++ rsync-2.5.5/generator.c Tue May 14 16:40:28 2002
> @@ -417,7 +417,7 @@
> }
>
> if (update_only && cmp_modtime(st.st_mtime,file->modtime)>0
&& fnamecmp == fname) {
> - if (verbose > 1)
> + if (verbose > 0)
> rprintf(FINFO,"%s is newer\n",fname);
> return;
> }