specifying a list of files to transfer

Wayne Davison wayned at users.sourceforge.net
Fri Jan 17 22:50:00 EST 2003

On Fri, Jan 17, 2003 at 12:14:13PM -0500, Andrew J. Schorr wrote:
> If I run rsync in such a way that parent directories are sent automatically,
> it will send the following files (based on -vvv output):
>    make_file(4,test)
>    make_file(4,test/foo.jpg)
>    make_file(4,test/bar.jpg)
>    make_file(4,test)
>    make_file(4,test/sub)
>    make_file(4,test/sub/foo.jpg)
>    make_file(4,test)
>    make_file(4,test/zeke.jpg)

Yeesh, that's bad.  It sends all these duplicates in the file list, but
then goes through the list and tries to remove duplicates, so it doesn't
transfer all of these duplicate names.  However, since it has a (known)
bug that fails to remove multiple duplicates in a row, so it does do
some significant redundant processing at the moment.

I've written a better implied-directory-adding routine that greatly
reduces the added dirs to the file list when the input list is in a
normal hierarchical order -- i.e. it doesn't use a hash, but does keep
track of the previous path in a better way.  I've also fixed the
duplicate-removing code to be able to handle multiple dups in a row.

I haven't committed either of these patches (since we're trying to get a
release out), but I'll put them into my --files-from patch when next I
update it.  The dups-removing fix is actually pretty simple, so if we
think that this would be something that we'd like to see in this next
release, I could commit that.


More information about the rsync mailing list