This solves the change of behavior introduced by processing
excludes/includes during os.walk(), where previously:
s3cmd sync --exclude='*' --include='*.gpg'
would walk the whole tree and transfer only the files named *.gpg.
Since the change to os.walk(), the exclude '*' matches everything, and
nothing is transferred.
This patch introduces --files-from=FILE to match rsync behaviour,
where the list of files to transfer (local to remote) is taken not
from an os.walk(), but from the explicit list in FILE.
The equivalent for remote to local, and remote to remote, is not yet
This allows shell syntax:
find . -name \*.gpg | s3cmd sync --files-from=- src dst
to take the list of files to transfer from stdin.
Be careful, as using with a --delete option will cause files on the
remote side not listed in stdin to be deleted too.
The restriction to use --files-from on the source and not the
destination list comes from the equivalent behavior in rsync.
The restriction on not using it for remote sources is only because I
haven't figured out the best way to handle that. That may be added in