Browse code

Created 0.9.8.x branch from 0.9.8.3 @trunk

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/branches/0.9.8.x@212 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2008/08/19 22:10:19
Showing 6 changed files
... ...
@@ -1,3 +1,23 @@
1
+2008-08-01  Michal Ludvig  <michal@logix.cz>
2
+
3
+	* TODO: Add some items
4
+
5
+2008-07-29  Michal Ludvig  <michal@logix.cz>
6
+
7
+	* Released version 0.9.8.3
8
+	  ------------------------
9
+
10
+2008-07-29  Michal Ludvig  <michal@logix.cz>
11
+
12
+	* S3/PkgInfo.py: Bumped up version to 0.9.8.3
13
+	* NEWS: Added 0.9.8.3
14
+
15
+2008-07-29  Michal Ludvig  <michal@logix.cz>
16
+
17
+	* S3/Utils.py (hash_file_md5): Hash files in 32kB chunks
18
+	  instead of reading it all up to a memory first to avoid
19
+	  OOM on large files.
20
+
1 21
 2008-07-07  Michal Ludvig  <michal@logix.cz>
2 22
 
3 23
 	* s3cmd.1: couple of syntax fixes from Mikhail Gusarov
... ...
@@ -1,3 +1,8 @@
1
+s3cmd 0.9.8.3 -   2008-07-29
2
+=============
3
+* Bugfix release. Avoid running out-of-memory in MD5'ing
4
+  large files.
5
+
1 6
 s3cmd 0.9.8.2 -   2008-06-27
2 7
 =============
3 8
 * Bugfix release. Re-upload file if Amazon doesn't send ETag 
... ...
@@ -1,5 +1,5 @@
1 1
 package = "s3cmd"
2
-version = "0.9.8.2"
2
+version = "0.9.8.3"
3 3
 url = "http://s3tools.logix.cz"
4 4
 license = "GPL version 2"
5 5
 short_description = "S3cmd is a tool for managing Amazon S3 storage space."
... ...
@@ -139,7 +139,12 @@ def mktmpfile(prefix = "/tmp/tmpfile-", randchars = 20):
139 139
 def hash_file_md5(filename):
140 140
 	h = md5.new()
141 141
 	f = open(filename, "rb")
142
-	h.update(f.read())
142
+	while True:
143
+		# Hash 32kB chunks
144
+		data = f.read(32*1024)
145
+		if not data:
146
+			break
147
+		h.update(data)
143 148
 	f.close()
144 149
 	return h.hexdigest()
145 150
 
... ...
@@ -1,6 +1,18 @@
1 1
 TODO list for s3cmd project
2 2
 ===========================
3 3
 
4
+- For 0.9.9
5
+  - Implement 'cp' and 'mv'
6
+  - Better upload / download progress display (and remove 
7
+    excessive useless transfer info from verbose/debug 
8
+    output)
9
+  - Warn when encryption is required (conf/arg) for sync
10
+    and request for explicit --no-encrypt parameter.
11
+  - Add --include/--include-from/--rinclude* for sync
12
+
13
+- After 1.0.0
14
+  - Speed up upload / download with multiple threads.
15
+
4 16
 - Treat objects with "/" in their name as directories
5 17
   - Will need local cache for bucket listings
6 18
   - More user friendly 'del' operation that would work
... ...
@@ -14,6 +14,7 @@ import errno
14 14
 import pwd, grp
15 15
 import glob
16 16
 import traceback
17
+import codecs
17 18
 
18 19
 from copy import copy
19 20
 from optparse import OptionParser, Option, OptionValueError, IndentedHelpFormatter
... ...
@@ -1037,6 +1038,9 @@ if __name__ == '__main__':
1037 1037
 		from S3 import Utils
1038 1038
 		from S3.Exceptions import *
1039 1039
 
1040
+		## Output UTF-8 in all cases, even on output redirects
1041
+		sys.stdout = codecs.getwriter("utf-8")(sys.stdout)
1042
+
1040 1043
 		main()
1041 1044
 		sys.exit(0)
1042 1045
 	except SystemExit, e: