[c5c522c] | 1 | Only in rsync-3.0.9: config.h.in |
---|
| 2 | Only in rsync-3.0.9: configure.sh |
---|
| 3 | Only in rsyncp/: debian |
---|
| 4 | diff -u -r rsync-3.0.9/options.c rsyncp/options.c |
---|
| 5 | --- rsync-3.0.9/options.c 2011-09-13 22:41:26.000000000 +0000 |
---|
| 6 | +++ rsyncp/options.c 2013-06-03 12:23:58.000000000 +0000 |
---|
| 7 | @@ -1543,8 +1543,9 @@ |
---|
| 8 | log_before_transfer = !am_server; |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | - if (do_progress && !verbose && !log_before_transfer && !am_server) |
---|
| 12 | - verbose = 1; |
---|
| 13 | +/* if (do_progress && !verbose && !log_before_transfer && !am_server) |
---|
| 14 | +verbose = 1; */ |
---|
| 15 | + |
---|
| 16 | |
---|
| 17 | if (dry_run) |
---|
| 18 | do_xfers = 0; |
---|
| 19 | diff -u -r rsync-3.0.9/progress.c rsyncp/progress.c |
---|
| 20 | --- rsync-3.0.9/progress.c 2009-01-17 21:41:35.000000000 +0000 |
---|
| 21 | +++ rsyncp/progress.c 2013-06-03 12:55:48.000000000 +0000 |
---|
| 22 | @@ -61,6 +61,8 @@ |
---|
| 23 | * printed for this file, so we should output a newline. (Not |
---|
| 24 | * necessarily the same as all bytes being received.) |
---|
| 25 | **/ |
---|
| 26 | +int64 progressed_bytes=0; |
---|
| 27 | +int64 last_mb=0; |
---|
| 28 | static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, |
---|
| 29 | int is_last) |
---|
| 30 | { |
---|
| 31 | @@ -70,6 +72,9 @@ |
---|
| 32 | unsigned long diff; |
---|
| 33 | double rate, remain; |
---|
| 34 | |
---|
| 35 | + |
---|
| 36 | + int64 this_mb=0; |
---|
| 37 | + |
---|
| 38 | if (is_last) { |
---|
| 39 | /* Compute stats based on the starting info. */ |
---|
| 40 | if (!ph_start.time.tv_sec |
---|
| 41 | @@ -78,6 +83,8 @@ |
---|
| 42 | rate = (double) (ofs - ph_start.ofs) * 1000.0 / diff / 1024.0; |
---|
| 43 | /* Switch to total time taken for our last update. */ |
---|
| 44 | remain = (double) diff / 1000.0; |
---|
| 45 | + progressed_bytes+=size; |
---|
| 46 | + this_mb=progressed_bytes/1000000; |
---|
| 47 | } else { |
---|
| 48 | /* Compute stats based on recent progress. */ |
---|
| 49 | if (!(diff = msdiff(&ph_list[oldest_hpos].time, now))) |
---|
| 50 | @@ -85,6 +92,13 @@ |
---|
| 51 | rate = (double) (ofs - ph_list[oldest_hpos].ofs) * 1000.0 |
---|
| 52 | / diff / 1024.0; |
---|
| 53 | remain = rate ? (double) (size - ofs) / rate / 1000.0 : 0.0; |
---|
| 54 | + |
---|
| 55 | + this_mb=(progressed_bytes+ofs)/1000000; |
---|
| 56 | + } |
---|
| 57 | + |
---|
| 58 | + if (this_mb!=last_mb){ |
---|
| 59 | + last_mb=this_mb; |
---|
| 60 | + rprintf(FCLIENT, "%d\n", this_mb); |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | if (rate > 1024*1024) { |
---|
| 64 | @@ -114,8 +128,10 @@ |
---|
| 65 | } else |
---|
| 66 | strlcpy(eol, "\r", sizeof eol); |
---|
| 67 | progress_is_active = 0; |
---|
| 68 | - rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s", |
---|
| 69 | - human_num(ofs), pct, rate, units, rembuf, eol); |
---|
| 70 | +/* rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s", |
---|
| 71 | + human_num(ofs), pct, rate, units, rembuf, eol);*/ |
---|
| 72 | + |
---|
| 73 | + |
---|
| 74 | if (!is_last) |
---|
| 75 | progress_is_active = 1; |
---|
| 76 | } |
---|
| 77 | Only in rsyncp/: progress.c.orig |
---|
| 78 | Only in rsync-3.0.9: proto.h |
---|
| 79 | Only in rsync-3.0.9: proto.h-tstamp |
---|
| 80 | Only in rsync-3.0.9: rsync.1 |
---|
| 81 | Only in rsync-3.0.9: rsyncd.conf.5 |
---|
| 82 | diff -u -r rsync-3.0.9/support/rrsync rsyncp/support/rrsync |
---|
| 83 | --- rsync-3.0.9/support/rrsync 2010-06-30 16:17:13.000000000 +0000 |
---|
| 84 | +++ rsyncp/support/rrsync 2013-06-03 11:58:16.000000000 +0000 |
---|
| 85 | @@ -31,7 +31,7 @@ |
---|
| 86 | # command="rrsync logs/client" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAzGhEeNlPr... |
---|
| 87 | # command="rrsync -ro results" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAmkHG1WCjC... |
---|
| 88 | # |
---|
| 89 | -# Format of the envrionment variables set by sshd: |
---|
| 90 | +# Format of the environment variables set by sshd: |
---|
| 91 | # SSH_ORIGINAL_COMMAND=rsync --server -vlogDtpr --partial . ARG # push |
---|
| 92 | # SSH_ORIGINAL_COMMAND=rsync --server --sender -vlogDtpr --partial . ARGS # pull |
---|
| 93 | # SSH_CONNECTION=client_addr client_port server_port |
---|