I'd like to know if there's any support for changing the behavior of the
-P and --progress options to increase the verbosity of the rsync
command. Without -v, -P and --progress don't provide clear output: -v
displays the current filename and -P and --progress display the progress
of the current transfer. It's important that these two pieces of
information work together since -P or --progress without -v is, in a
sense, gibberish.
I suggest the simple patch given below. If -P or --progress is included
but the verbosity level is 0, it will automatically be incremented to 1.
Toby
--- ./options.c.orig Tue Aug 5 12:18:41 2003
+++ ./options.c Tue Aug 5 12:18:41 2003
@@ -363,7 +363,7 @@
{"daemon", 0, POPT_ARG_NONE, &am_daemon, 0, 0, 0
},
{"no-detach", 0, POPT_ARG_NONE, &no_detach, 0, 0, 0
},
{"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0
},
- {"progress", 0, POPT_ARG_NONE, &do_progress, 0, 0, 0
},
+ {"progress", 0, POPT_ARG_NONE, 0, OPT_PROGRESS, 0, 0 },
{"partial", 0, POPT_ARG_NONE, &keep_partial, 0, 0,
0 },
{"ignore-errors", 0, POPT_ARG_NONE, &ignore_errors, 0,
0, 0 },
{"blocking-io", 0, POPT_ARG_VAL, &blocking_io, 1, 0,
0 },
@@ -566,6 +566,10 @@
keep_partial = 1;
break;
+ case OPT_PROGRESS:
+ do_progress = 1;
+ break;
+
case OPT_WRITE_BATCH:
/* popt stores the filename in batch_prefix for
us */
write_batch = 1;
@@ -629,6 +633,10 @@
if (relative_paths < 0)
relative_paths = files_from? 1 : 0;
+
+ if (do_progress & (!verbose)) {
+ verbose++;
+ }
if (!backup_suffix)
backup_suffix = backup_dir? "" : BACKUP_SUFFIX;