On Tue, 2006-05-16 at 17:12 -0700, kimor79@sonic.net
wrote:> rsync --read-batch=foo /mysrc remote:/dest
> gives
> remote destination is not allowed with --read-batch
And it shouldn't. Isn't it a bigger problem that there is a source
argument specified even with --read-batch? I think rsync should say
something like "the batch is the source, so specify only a
destination"
whether the destination is local or remote. Currently, a remote
destination produces the above message and a local destination produces
a usage message that gives the user no clue about what the problem is.
The test that produces the usage message is commented "for remote
source, only single dest arg can remain". I think this test should go
up higher, inside the if (!read_batch); perhaps the usage message could
be replaced by a meaningful error message. A similar test that produces
"the batch is the source, so specify only a destination" should go
above
the current test for "remote destination is not allowed with
--read-batch".
Oh: and if a batch includes the entire file list (as opposed to just
those files that need to be updated), --read-batch and --list-only
should work nicely together. Currently
rsync --read-batch=foo --list-only ignored-destination/
produces a listing and then a bunch of "skipping batched update"
messages; it should produce a listing without trying to update anything.
And these should do the same thing (in the second case, --list-only is
implied because there is no destination):
rsync --read-batch=foo --list-only
rsync --read-batch=foo
Matt