Bug 2390 - some dry run stats inaccurate
Summary: some dry run stats inaccurate
Status: CLOSED WONTFIX
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.4
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-24 17:21 UTC by David Wood
Modified: 2005-04-01 11:25 UTC (History)
0 users

See Also:


Attachments
Proposed sender.c / receiver.c patch (1.51 KB, patch)
2005-02-24 17:21 UTC, David Wood
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Wood 2005-02-24 17:21:00 UTC
When using rsync with "--dry-run --stats" the reported "Number of files
transferred" and "Total transferred file size" are incorrect:

bsqa1.nyc:/tmp/rsync/test #  /tmp/rsync/bin/rsync --archive --dry-run --stats
/tmp/rsync/ bsprod1:/tmp/rsync/
building file list ... done
./
bin/
man/
man/man1/
man/man1/rsync.1
man/man5/
man/man5/rsyncd.conf.5
test/
test/foo

Number of files: 10
Number of files transferred: 3
Total file size: 853173 bytes
Total transferred file size: 126433 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 188
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 254
Total bytes received: 74

sent 254 bytes  received 74 bytes  656.00 bytes/sec
total size is 853173  speedup is 2601.14

Notice that rsync reported that 3 files were transferred and they had a size of
126433 bytes.  Rsync was run with "--dry-run" so in fact 0 files were
transferred with 0 size.  I'll attach a patch I've been using to work around
this problem.  David
Comment 1 David Wood 2005-02-24 17:21:41 UTC
Created attachment 980 [details]
Proposed sender.c / receiver.c patch
Comment 2 Wayne Davison 2005-02-24 19:39:22 UTC
The purpose of the --dry-run is to tell you what would be transferred.  The
output of the names is exactly that: the file being mentioned normally means
"this file has been transferred", but with --dry-run it instead means "this file
would be transferred".  The stats follow in this same vein:  how many files
would have been transferred and how large are they?