…md into merge
…ning md5sums Inspired by a patch from Jay McCanta <J.McCanta@F5.com> who suggested this was possible, 2013-05-14 to the s3tools-general mailing list. This patch adds the --xattr command line and md5_xattr config file option, specifying a file system extended attribute in the USER namespace which contains the md5sum for the file. If the extended attribute is not present, the code falls back to performing local file I/O to calculate the md5sum, as before. This can be used to speed up transfers by avoiding the need to calculate md5sums for all files, assuming this has been done at least once before somehow, with the results stored in each file's xattr. In addition to Jay's work, this patch simplifies testing for xattr module import success, passes the result into the Config object, and ensures the correct namespace is used. Also added a test to the test suite, and the entry on the manpage.
Fixes #155 Similar to rsync --max-delete, allow the user to specify a maximum number of objects to delete for the [del] and [sync] commands. If that number would be exceeded, output a warning message and do not delete anything. This prevents a simple invocation error (e.g. launching from the wrong directory) from erasing all the data in a bucket accidentally. By default, this is disabled. A user must explicitly specify --max-delete=NUM for this protection to be available, just as in rsync.