Ticket #534: tahoe mkdir unicode support.darcspatch

File tahoe mkdir unicode support.darcspatch, 10.1 KB (added by zooko, at 2009-06-09T19:52:45Z)
Line 
1Mon Apr 27 03:10:47 MDT 2009  francois@ctrlaltdel.ch
2  * cli: tahoe mkdir unicode support
3
4New patches:
5
6[cli: tahoe mkdir unicode support
7francois@ctrlaltdel.ch**20090427091047
8 Ignore-this: 1375e8ea621d862ed4e261a8fc6cd772
9] {
10hunk ./src/allmydata/scripts/cli.py 52
11 
12 class MakeDirectoryOptions(VDriveOptions):
13     def parseArgs(self, where=""):
14-        self.where = where
15+        self.where = argv_to_unicode(where)
16     longdesc = """Create a new directory, either unlinked or as a subdirectory."""
17 
18 class AddAliasOptions(VDriveOptions):
19hunk ./src/allmydata/scripts/tahoe_mkdir.py 5
20 import urllib
21 from allmydata.scripts.common_http import do_http, check_http_error
22 from allmydata.scripts.common import get_alias, DEFAULT_ALIAS
23+from allmydata.util.stringutils import unicode_to_url
24 
25 def mkdir(options):
26     nodeurl = options['node-url']
27hunk ./src/allmydata/scripts/tahoe_mkdir.py 35
28         path = path[:-1]
29     # path (in argv) must be "/".join([s.encode("utf-8") for s in segments])
30     url = nodeurl + "uri/%s/%s?t=mkdir" % (urllib.quote(rootcap),
31-                                           urllib.quote(path))
32+                                           urllib.quote(unicode_to_url(path)))
33     resp = do_http("POST", url)
34     check_http_error(resp, stderr)
35     new_uri = resp.read().strip()
36hunk ./src/allmydata/test/test_cli.py 840
37                                               dn, "tahoe:"))
38         return d
39 
40+class Mkdir(GridTestMixin, CLITestMixin, unittest.TestCase):
41+    def test_unicode_mkdir(self):
42+        self.basedir = os.path.dirname(self.mktemp())
43+        self.set_up_grid()
44+
45+        d = self.do_cli("create-alias", "tahoe")
46+        d.addCallback(lambda res: self.do_cli("mkdir", "tahoe:Motörhead"))
47+
48+        return d
49+
50+
51 class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase):
52 
53     def writeto(self, path, data):
54}
55
56Context:
57
58[test_cli.Backup: increase timeout massively, it takes 1200s on zandr's ARM linkstation
59warner@lothar.com**20090609052801] 
60[tests: double the timeouts on some tests which time-out on Francois's box
61zooko@zooko.com**20090609021753
62 Ignore-this: b2727b04402f24a9b9123d2f84068106
63] 
64[tests: bump up timeouts so that the tests can finish before timeout on Francois's little arm box
65zooko@zooko.com**20090608225557
66 Ignore-this: fb83698338b2f12546cd3e1dcb896d34
67] 
68[tests: increase timeouts on some other tests that timed-out on Francois's arm box
69zooko@zooko.com**20090605143437
70 Ignore-this: 2903cc20d914fc074c8d7a6c47740ba6
71] 
72[tests: bump up the timeout on a bunch of tests that took longer than the default timeout (120s) on François Lenny-armv5tel
73zooko@zooko.com**20090605031444
74 Ignore-this: 84d67849b1f8edc88bf7001e31b5f7f3
75] 
76[backup: remove the --no-backupdb command, the handling of "can't import sqlite", and the related tests, and change an error message to more correctly indicate failure to load the database from disk rather than failure to import sqlite module
77zooko@zooko.com**20090604173131
78 Ignore-this: 8200a9fdfc49243c280ecd1d0c44fa19
79 Fixes #728.
80] 
81[more refactoring: move get_all_serverids() and get_nickname_for_serverid() from Client to storage_broker
82warner@lothar.com**20090602030750] 
83[more storage_broker refactoring: downloader gets a broker instead of a client,
84warner@lothar.com**20090602022511
85 use Client.get_storage_broker() accessor instead of direct attribute access.
86] 
87[test_runner.py: remove test_client_no_noise: the issue in question is
88warner@lothar.com**20090601225007
89 ticketed in http://divmod.org/trac/ticket/2830 and doesn't need a Tahoe-side
90 change, plus this test fails on win32 for unrelated reasons (and test_client
91 is the place to think about the win32 issue).
92] 
93[remove plaintext-hashing code from the helper interface, to close #722
94warner@lothar.com**20090601224916
95 and deny the Helper the ability to mount a partial-information-guessing
96 attack. This will probably break compatibility between new clients and very
97 old (pre-1.0) helpers.
98] 
99[start to factor server-connection-management into a distinct 'StorageServerFarmBroker' object, separate from the client and the introducer. This is the starting point for #467: static server selection
100warner@lothar.com**20090601210604] 
101[mutable: catch and display first error, so code bugs which break all servers get displayed better
102warner@lothar.com**20090601210407] 
103[misc/run-with-pythonpath.py: exec() the child (on unix), to remove the intermediate process
104warner@lothar.com**20090601210137] 
105[setup: require pysqlite >= v2.0.5. if we are running on Python < 2.5
106zooko@zooko.com**20090604154548
107 Ignore-this: cf04f46079821df209d01dad2e24b40b
108] 
109[setup: add pysqlite and sqlite to get_package_versions()
110zooko@zooko.com**20090604153728
111 Ignore-this: a1dea7fabeab2b08fb0d8d462facdb4d
112] 
113[docs: small edit to about.html
114zooko@zooko.com**20090528233422
115 Ignore-this: 1cfbb1f8426ed6d63b2d3952e4464ddc
116] 
117[docs: add links to Tahoe-LAFS for Paranoids and Tahoe-LAFS for Corporates in about.html
118zooko@zooko.com**20090528232717
119 Ignore-this: 7b70baa700d6b6f6e9ceec4132efe5
120] 
121[docs: edit about.html and include network-and-reliance-topology.png (loaded from http://allmydata.org )
122zooko@zooko.com**20090527150916
123 Ignore-this: 44adc61cde8ced8be2f0a7dfc7d95dad
124] 
125[docs: a few more edits to network-and-reliance-topology.svg
126zooko@zooko.com**20090527150458
127 Ignore-this: 2eac8c33fe71be25ff809b399c6193c1
128] 
129[docs: update NEWS, relnotes.txt, CREDITS to mention WUI Style
130zooko@zooko.com**20090526233654
131 Ignore-this: 72d16ec833bc4a22af23d29ea1d5ff8b
132] 
133[docs: update network-and-reliance-topology.svg for beauty and clarity
134zooko@zooko.com**20090527031123
135 Ignore-this: 5510914849771900ac29b4312470d84
136] 
137[Modify markup of Tahoe web pages to be more amenable to styling; some minor changes of wording.
138Kevin Reid <kpreid@mac.com>**20090526232545
139 Ignore-this: 8845937f0df6c7ddc07abe3211428a6f
140] 
141[Tweak wording in directory page: not-read-only is "modifiable", mention creating a directory _in this directory_.
142Kevin Reid <kpreid@mac.com>**20090526232414
143 Ignore-this: f006ec52ba2051802e025a60bcface56
144] 
145[Comment on duplication of code/markup found during styling project.
146Kevin Reid <kpreid@mac.com>**20090503203442
147 Ignore-this: a4b7f9f0ab57d2c03be9ba761be8d854
148] 
149[Add CSS styles to spiff up the Tahoe WUI's appearance, particularly the welcome page and directories.
150Kevin Reid <kpreid@mac.com>**20090503203142
151 Ignore-this: 5c50af241c1a958b5180ef2b6a49f626
152] 
153[Link all Tahoe web pages to the /tahoe_css stylesheet which already exists.
154Kevin Reid <kpreid@mac.com>**20090503202533
155 Ignore-this: 2ea8d14d3168b9502cf39d5ea3f2f2a8
156] 
157[Fix broken link from Provisioning to Reliability page.
158Kevin Reid <kpreid@mac.com>**20090501191050
159 Ignore-this: 56dc1a5e659b70cc02dc4df7b5d518cd
160] 
161[docs: network-and-reliance-topology.svg: nicer server icons, mv out of the "specifications" subdir
162zooko@zooko.com**20090526165842
163 Ignore-this: 8f47ab3a0ab782c1f0d46e10bcaebe5b
164] 
165[accounting-overview.txt: more edits
166warner@lothar.com**20090523190359] 
167[accounting-overview.txt: small edits
168warner@lothar.com**20090523184011] 
169[_auto_deps.py: require foolscap-0.4.1, which adds an important fix for py2.4
170warner@lothar.com**20090523011103] 
171[immutable/encode.py: tolerate immediate _remove_shareholder by copying the
172warner@lothar.com**20090522184424
173 landlord list before iterating over it. This can probably only happen in unit
174 tests, but cleaning it up makes certain test failures easier to analyze.
175] 
176[switch to using RemoteException instead of 'wrapped' RemoteReferences. Should fix #653, the rref-EQ problem
177warner@lothar.com**20090522004632] 
178[switch all foolscap imports to use foolscap.api or foolscap.logging
179warner@lothar.com**20090522003823] 
180[_auto_deps.py: bump our foolscap dependency to 0.4.0, since I'm about to start using its new features
181warner@lothar.com**20090522002100] 
182[test_runner.py: fix minor typo
183warner@lothar.com**20090520033620] 
184[docs: update network-and-reliance-topology.svg
185zooko@zooko.com**20090526163105
186 Ignore-this: 2b864b4ed8743d4a15dfbb7eff3fa561
187] 
188[setup: fix bug (wrong import) in error message, as noticed by pyflakes
189zooko@zooko.com**20090519195642
190 Ignore-this: f1b9f8c00b46c1b5f2f20e5fc424f341
191] 
192[setup: fix trivial bug in recent patch to test base64.py at startup
193zooko@zooko.com**20090519195129
194 Ignore-this: f6be038f74b53ca69e7109fe34adfbc
195] 
196[setup: make Tahoe exit at startup with a useful error message if the base64.py module is buggy (fixes part of #710)
197zooko@zooko.com**20090519194555
198 Ignore-this: aa4d398235ddca8d417d61c9688e154
199] 
200[test_introducer.py: add a test for the python2.4.0/2.4.1 bug in base64.b32decode
201warner@lothar.com**20090519034101] 
202[immutable WriteBucketProxy: use pipeline to speed up uploads by overlapping roundtrips, for #392
203warner@lothar.com**20090518234422] 
204[util/pipeline.py: new utility class to manage size-limited work pipelines, for #392
205warner@lothar.com**20090518234326] 
206[docs: add a diagram that I'm about to show to the Boulder Linux Users Group: network-and-reliance-topology.svg
207zooko@zooko.com**20090514232059
208 Ignore-this: 2420c0a7c254c9f0f2349d9130490d33
209] 
210[tests: mark test_runner as coded in utf-8 instead of ascii
211zooko@zooko.com**20090507223151
212 Ignore-this: ccf1ba9e5a9b53602701a36f9fdb545e
213] 
214[tests: raise timeout on test_runner.RunNode.test_introducer from 120s to 240s, since it hit the 120s time-out on François Lenny-armv5tel
215zooko@zooko.com**20090507215012
216 Ignore-this: ba18fe6832ba255d4971e8f623ed7da5
217] 
218[setup: fix comment in setup.py
219zooko@zooko.com**20090507215003
220 Ignore-this: c46ef664630d52733138ef7fbc551c1c
221] 
222[docs: how_to_make_a_tahoe_release.txt: a couple of small edits
223zooko@zooko.com**20090507214932
224 Ignore-this: ae92aa835ad369f4b9e6e49d681957a3
225] 
226[.darcs-boringfile: also ignore .gitignore
227warner@allmydata.com**20090415210550
228 Ignore-this: d29db314a1e506f6240859559436b4c3
229] 
230[.darcs-boringfile: ignore .git, I'm starting to play around with it
231warner@allmydata.com**20090415205929
232 Ignore-this: 89234453516483c9586cd6e1351e88b5
233] 
234[fix quicktest: stop using setuptools, add misc/run-with-pythonpath.py, to make it run faster
235warner@lothar.com**20090414201400] 
236[TAG allmydata-tahoe-1.4.1
237zooko@zooko.com**20090414025636
238 Ignore-this: de78fc32364c83e9f4e26b5abcfdea4a
239] 
240Patch bundle hash:
241b2b804b51ba3ffa892ff86d7dd0ebc4d5b00c094