git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@152 830e0280-6d2a-0410-9c65-932aecc39d9d
Michal Ludvig authored on 2007/10/01 07:53:07... | ... |
@@ -261,7 +261,7 @@ def cmd_object_del(args): |
261 | 261 |
response = s3.object_delete_uri(uri) |
262 | 262 |
output("Object %s deleted" % uri) |
263 | 263 |
|
264 |
-def cmd_sync(agrs): |
|
264 |
+def cmd_sync(args): |
|
265 | 265 |
src = args.pop(0) |
266 | 266 |
if S3Uri(src).type != "file": |
267 | 267 |
raise ParameterError("Source must be a local path instead of: %s" % src) |
... | ... |
@@ -597,15 +597,23 @@ if __name__ == '__main__': |
597 | 597 |
optparser.add_option("-c", "--config", dest="config", metavar="FILE", help="Config file name. Defaults to %default") |
598 | 598 |
optparser.add_option( "--dump-config", dest="dump_config", action="store_true", help="Dump current configuration after parsing config files and command line options and exit.") |
599 | 599 |
|
600 |
+ optparser.add_option("-n", "--dry-run", dest="dry_run", action="store_true", help="Only show what should be uploaded or downloaded but don't actually do it. May still perform S3 requests to get bucket listings though.") |
|
601 |
+ |
|
600 | 602 |
optparser.add_option("-e", "--encrypt", dest="encrypt", action="store_true", help="Encrypt files before uploading to S3.") |
603 |
+ optparser.add_option( "--no-encrypt", dest="encrypt", action="store_false", help="Don't encrypt files.") |
|
601 | 604 |
optparser.add_option("-f", "--force", dest="force", action="store_true", help="Force overwrite and other dangerous operations.") |
602 | 605 |
optparser.add_option("-P", "--acl-public", dest="acl_public", action="store_true", help="Store objects with ACL allowing read by anyone.") |
606 |
+ optparser.add_option( "--acl-private", dest="acl_public", action="store_false", help="Store objects with default ACL allowing access by you only.") |
|
603 | 607 |
optparser.add_option( "--delete-removed", dest="delete_removed", action="store_true", help="Delete remote objects with no corresponding local file [sync]") |
608 |
+ optparser.add_option( "--no-delete-removed", dest="delete_removed", action="store_false", help="Don't delete remote objects.") |
|
609 |
+ optparser.add_option("-p", "--preserve", dest="preserve_attrs", action="store_true", help="Preserve filesystem attributes (mode, ownership, timestamps). Default for [sync] command.") |
|
610 |
+ optparser.add_option( "--no-preserve", dest="preserve_attrs", action="store_false", help="Don't store FS attributes") |
|
604 | 611 |
|
605 | 612 |
optparser.add_option("-m", "--mime-type", dest="default_mime_type", type="mimetype", metavar="MIME/TYPE", help="Default MIME-type to be set for objects stored.") |
606 | 613 |
optparser.add_option("-M", "--guess-mime-type", dest="guess_mime_type", action="store_true", help="Guess MIME-type of files by their extension. Falls back to default MIME-Type as specified by --mime-type option") |
607 | 614 |
|
608 | 615 |
optparser.add_option("-H", "--human-readable-sizes", dest="human_readable_sizes", action="store_true", help="Print sizes in human readable form.") |
616 |
+ |
|
609 | 617 |
optparser.add_option("-v", "--verbose", dest="verbosity", action="store_const", const=logging.INFO, help="Enable verbose output.") |
610 | 618 |
optparser.add_option("-d", "--debug", dest="verbosity", action="store_const", const=logging.DEBUG, help="Enable debug output.") |
611 | 619 |
optparser.add_option( "--version", dest="show_version", action="store_true", help="Show s3cmd version (%s) and exit." % (PkgInfo.version)) |