rsync-bugs and unclear semantics when copying multiple
source-dirs to one target
jw at pegasys.ws
Tue Nov 25 19:18:29 EST 2003
On Tue, Nov 25, 2003 at 08:46:38AM +0100, Dirk Pape wrote:
> Hello Martin,
> Thanks for your fast answer to my problem. I am now happy to have a clear
> position from the developer of rsync (though I am not very happy with the
> position itself ;-).
> --Am Dienstag, 25. November 2003 12:14 Uhr +1100 schrieb Martin Pool
> <mbp at samba.org>:
> >At the moment your options are:
> > Fix rsync to support this behaviour.
> I would like to take a quick look to tis first option you mentioned, before
> I conider the others.
> Do you have and can you send me some API-documentation for the flist
> module, which I believe is the one, I have to modify.
The source is the documentation.
This has already been discussed on-list. The key is to only
do the flist sort on the sender. At this time it is done on
both sender and receiver so any changes to the sort results
break backwards compatability. Making it so the sort is
only done on the sender will require a protocol version bump
but once done all future sort and duplicate removal changes
will then be future protocol version independent.
The way to do this is to defer the file list transmission in
send_file_list() until after the whole list is accumulated.
Then, based on protocol version, either run clean_flist()
before or after the list transmission. Again depending on
protocol don't run clean_flist() in recv_file_list(). Once
that is done, provided you are on the newer protocol you can
use different logic in clean_flist() to determine how to
cope with duplicates.
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync