Permalink
Browse files

* s3cmd, run-test.py, TODO, NEWS: Added --dry-run

  and --exclude/--include for [setacl].



git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@391 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information...
1 parent 1ae39a8 commit c74f3dfeba30e34b089e2a1dcbbf22e8e0811f9e @mludvig mludvig committed May 27, 2009
Showing with 18 additions and 3 deletions.
  1. +2 −0 ChangeLog
  2. +1 −1 NEWS
  3. +1 −2 TODO
  4. +14 −0 s3cmd
View
@@ -1,6 +1,8 @@
2009-05-28 Michal Ludvig <michal@logix.cz>
* s3cmd, run-test.py, TODO, NEWS: Added --dry-run
+ and --exclude/--include for [setacl].
+ * s3cmd, run-test.py, TODO, NEWS: Added --dry-run
and --exclude/--include for [del].
2009-05-28 Michal Ludvig <michal@logix.cz>
View
2 NEWS
@@ -7,7 +7,7 @@ s3cmd 1.0.0
pre-processing. Good for fixing unreadable buckets.
* Added --recursive support for [cp] and [mv], including
multiple-source arguments, --include/--exclude, --dry-run, etc.
-* Added --exclude/--include and --dry-run for [del].
+* Added --exclude/--include and --dry-run for [del], [setacl].
s3cmd 0.9.9 - 2009-02-17
===========
View
3 TODO
@@ -4,8 +4,7 @@ TODO list for s3cmd project
- For 0.9.9.x
- Make 'sync s3://bkt/some-filename local/other-filename' work
(at the moment it'll always download).
- - Enable --exclude for [setacl], [ls].
- - Enable --dry-run for [setacl], reject for all others.
+ - Enable --exclude for [ls].
- Allow change /tmp to somewhere else
- With --guess-mime use 'magic' module if available.
- Support --preserve for [put] and [get]. Update manpage.
View
14 s3cmd
@@ -1073,7 +1073,21 @@ def cmd_setacl(args):
set_to_acl = cfg.acl_public and "Public" or "Private"
remote_list = fetch_remote_list(args)
+ remote_list, exclude_list = _filelist_filter_exclude_include(remote_list)
+
remote_count = len(remote_list)
+
+ info(u"Summary: %d remote files to update" % remote_count)
+
+ if cfg.dry_run:
+ for key in exclude_list:
+ output(u"exclude: %s" % unicodise(key))
+ for key in remote_list:
+ output(u"setacl: %s" % remote_list[key]['object_uri_str'])
+
+ warning(u"Exitting now because of --dry-run")
+ return
+
seq = 0
for key in remote_list:
seq += 1

0 comments on commit c74f3df

Please sign in to comment.