Make the combination of --write-batch with --dry-run create a batch file without
actually updating the destination. (The current behavior is to complain if the
user tries to combine these options.)
The implementation would require rsync to do more work in --dry-run mode than
normal when --write-batch is specified (i.e. generating checksums, computing
diffs), but still not send the update-data to the receiver (just to write it to
the batch file). This _might_ be fairly easy, but I haven't checked yet to be sure.
(Suggested by Peter Hartley.)
This should not be that hard. The generator would need to be modified so that
it actually computes the checksums and sends them to the sender in this mode and
(for a push) the sender would need to be enhanced to output its changes to the
batch fd instead of the socket, or (for a pull) the sender would need to go
ahead and send its update data down the socket while the receiver would just
throw away the update data after recording it. Also, the --write-batch option
would need to be sent to a server sender (which it is not currently) to trigger
the right mode (when pulling files). Care needs to be taken to test for
compatibilty problems in this regard (since we currently avoid sending
--write-batch to the server for compatibility reasons).
I want --dry-run to always indicate that no changes will be made whatsoever, so
I'm changing the summary of this bug to correspond with a new option that now
has a diff in the "patches" dir of CVS: --only-write-batch=FILE. This option
accomplishes the functionality you requested, while both avoiding the
aforementioned compatibility problem that using --write-batch would entail, and
allowing --dry-run to be fixed to work properly with --write-batch/--read-batch
(which is now the case in CVS -- this combo just reports what would happen
Note that 2.6.4 won't have this new option because the patch still needs some
more testing (and the option name may change before the dust settles).
I added the --only-write-batch option to CVS a little while ago (including some
fixes not present in the patch).