Ticket #1547: fix-1547.darcs.patch

File fix-1547.darcs.patch, 36.6 KB (added by davidsarah, at 2011-10-02T04:08:30Z)

Change the file upload forms on directory and welcome pages to use a 3-way radio button to select immutable, SDMF, or MDMF. Add '(experimental)' to the label for creating an MDMF directory. Also improve the spacing of form elements. refs #1547. Depends on #1552.

Line 
11 patch for repository davidsarah@dev.allmydata.org:/home/darcs/tahoe/trunk:
2
3Sun Oct  2 04:45:03 BST 2011  david-sarah@jacaranda.org
4  * Change the file upload forms on directory and welcome pages to use a 3-way radio button to select immutable, SDMF, or MDMF. Add '(experimental)' to the label for creating an MDMF directory. Also improve the spacing of form elements. refs #1547
5
6New patches:
7
8[Change the file upload forms on directory and welcome pages to use a 3-way radio button to select immutable, SDMF, or MDMF. Add '(experimental)' to the label for creating an MDMF directory. Also improve the spacing of form elements. refs #1547
9david-sarah@jacaranda.org**20111002034503
10 Ignore-this: 46a8b966fddc8ccaa7e70bffbd68b52f
11] {
12hunk ./src/allmydata/web/directory.py 577
13     u = from_string_dirnode(dirnode.get_uri())
14     return u.abbrev_si()
15 
16+SPACE = u"\u00A0"*2
17+
18 class DirectoryAsHTML(rend.Page):
19     # The remainder of this class is to render the directory into
20     # human+browser -oriented HTML.
21hunk ./src/allmydata/web/directory.py 801
22 
23         return ctx.tag
24 
25-    # XXX: Duplicated from root.py.
26+    # XXX: similar to render_upload_form and render_mkdir_form in root.py.
27     def render_forms(self, ctx, data):
28         forms = []
29 
30hunk ./src/allmydata/web/directory.py 810
31         if self.dirnode_children is None:
32             return T.div["No upload forms: directory is unreadable"]
33 
34-        mdmf_directory_input = T.input(type='radio', name='mutable-type',
35-                                       id='mutable-directory-mdmf',
36-                                       value='mdmf')
37-        sdmf_directory_input = T.input(type='radio', name='mutable-type',
38-                                       id='mutable-directory-sdmf',
39-                                       value='sdmf', checked='checked')
40-        mkdir = T.form(action=".", method="post",
41-                       enctype="multipart/form-data")[
42+        mkdir_sdmf = T.input(type='radio', name='format',
43+                             value='sdmf', id='mkdir-sdmf',
44+                             checked='checked')
45+        mkdir_mdmf = T.input(type='radio', name='format',
46+                             value='mdmf', id='mkdir-mdmf')
47+
48+        mkdir_form = T.form(action=".", method="post",
49+                            enctype="multipart/form-data")[
50             T.fieldset[
51             T.input(type="hidden", name="t", value="mkdir"),
52             T.input(type="hidden", name="when_done", value="."),
53hunk ./src/allmydata/web/directory.py 822
54             T.legend(class_="freeform-form-label")["Create a new directory in this directory"],
55-            "New directory name: ",
56-            T.input(type="text", name="name"), " ",
57-            T.label(for_='mutable-directory-sdmf')["SDMF"],
58-            sdmf_directory_input,
59-            T.label(for_='mutable-directory-mdmf')["MDMF"],
60-            mdmf_directory_input,
61-            T.input(type="submit", value="Create"),
62+            "New directory name:"+SPACE,
63+            T.input(type="text", name="name"), SPACE,
64+            T.input(type="submit", value="Create"), SPACE*2,
65+            mkdir_sdmf, T.label(for_='mutable-directory-sdmf')[" SDMF"], SPACE,
66+            mkdir_mdmf, T.label(for_='mutable-directory-mdmf')[" MDMF (experimental)"],
67             ]]
68hunk ./src/allmydata/web/directory.py 828
69-        forms.append(T.div(class_="freeform-form")[mkdir])
70+        forms.append(T.div(class_="freeform-form")[mkdir_form])
71 
72hunk ./src/allmydata/web/directory.py 830
73-        # Build input elements for mutable file type. We do this outside
74-        # of the list so we can check the appropriate format, based on
75-        # the default configured in the client (which reflects the
76-        # default configured in tahoe.cfg)
77-        if self.default_mutable_format == MDMF_VERSION:
78-            mdmf_input = T.input(type='radio', name='mutable-type',
79-                                 id='mutable-type-mdmf', value='mdmf',
80-                                 checked='checked')
81-        else:
82-            mdmf_input = T.input(type='radio', name='mutable-type',
83-                                 id='mutable-type-mdmf', value='mdmf')
84-
85-        if self.default_mutable_format == SDMF_VERSION:
86-            sdmf_input = T.input(type='radio', name='mutable-type',
87-                                 id='mutable-type-sdmf', value='sdmf',
88-                                 checked="checked")
89-        else:
90-            sdmf_input = T.input(type='radio', name='mutable-type',
91-                                 id='mutable-type-sdmf', value='sdmf')
92+        upload_chk  = T.input(type='radio', name='format',
93+                              value='chk', id='upload-chk',
94+                              checked='checked')
95+        upload_sdmf = T.input(type='radio', name='format',
96+                              value='sdmf', id='upload-sdmf')
97+        upload_mdmf = T.input(type='radio', name='format',
98+                              value='mdmf', id='upload-mdmf')
99 
100hunk ./src/allmydata/web/directory.py 838
101-        upload = T.form(action=".", method="post",
102-                        enctype="multipart/form-data")[
103+        upload_form = T.form(action=".", method="post",
104+                             enctype="multipart/form-data")[
105             T.fieldset[
106             T.input(type="hidden", name="t", value="upload"),
107             T.input(type="hidden", name="when_done", value="."),
108hunk ./src/allmydata/web/directory.py 844
109             T.legend(class_="freeform-form-label")["Upload a file to this directory"],
110-            "Choose a file to upload: ",
111-            T.input(type="file", name="file", class_="freeform-input-file"),
112-            " ",
113-            T.input(type="submit", value="Upload"),
114-            " Mutable?:",
115-            T.input(type="checkbox", name="mutable"),
116-            sdmf_input, T.label(for_="mutable-type-sdmf")["SDMF"],
117-            mdmf_input,
118-            T.label(for_="mutable-type-mdmf")["MDMF (experimental)"],
119+            "Choose a file to upload:"+SPACE,
120+            T.input(type="file", name="file", class_="freeform-input-file"), SPACE,
121+            T.input(type="submit", value="Upload"),                          SPACE*2,
122+            upload_chk,  T.label(for_="upload-chk") [" Immutable"],          SPACE,
123+            upload_sdmf, T.label(for_="upload-sdmf")[" SDMF"],               SPACE,
124+            upload_mdmf, T.label(for_="upload-mdmf")[" MDMF (experimental)"],
125             ]]
126hunk ./src/allmydata/web/directory.py 851
127-        forms.append(T.div(class_="freeform-form")[upload])
128+        forms.append(T.div(class_="freeform-form")[upload_form])
129 
130hunk ./src/allmydata/web/directory.py 853
131-        mount = T.form(action=".", method="post",
132-                        enctype="multipart/form-data")[
133+        attach_form = T.form(action=".", method="post",
134+                             enctype="multipart/form-data")[
135             T.fieldset[
136             T.input(type="hidden", name="t", value="uri"),
137             T.input(type="hidden", name="when_done", value="."),
138hunk ./src/allmydata/web/directory.py 859
139             T.legend(class_="freeform-form-label")["Add a link to a file or directory which is already in Tahoe-LAFS."],
140-            "New child name: ",
141-            T.input(type="text", name="name"), " ",
142-            "URI of new child: ",
143-            T.input(type="text", name="uri"), " ",
144+            "New child name:"+SPACE,
145+            T.input(type="text", name="name"), SPACE*2,
146+            "URI of new child:"+SPACE,
147+            T.input(type="text", name="uri"), SPACE,
148             T.input(type="submit", value="Attach"),
149             ]]
150hunk ./src/allmydata/web/directory.py 865
151-        forms.append(T.div(class_="freeform-form")[mount])
152+        forms.append(T.div(class_="freeform-form")[attach_form])
153         return forms
154 
155     def render_results(self, ctx, data):
156hunk ./src/allmydata/web/root.py 15
157 from allmydata import get_package_versions_string
158 from allmydata import provisioning
159 from allmydata.util import idlib, log
160-from allmydata.interfaces import IFileNode, MDMF_VERSION, SDMF_VERSION
161+from allmydata.interfaces import IFileNode
162 from allmydata.web import filenode, directory, unlinked, status, operations
163 from allmydata.web import reliability, storage
164 from allmydata.web.common import abbreviate_size, getxmlfile, WebError, \
165hunk ./src/allmydata/web/root.py 153
166 </html>
167 ''')
168 
169+SPACE = u"\u00A0"*2
170+
171 class Root(rend.Page):
172 
173     addSlash = True
174hunk ./src/allmydata/web/root.py 314
175                       enctype="multipart/form-data")[
176             T.fieldset[
177             T.legend(class_="freeform-form-label")["Download a file"],
178-            T.div["Tahoe-URI to download: ",
179+            T.div["Tahoe-URI to download:"+SPACE,
180                   T.input(type="text", name="uri")],
181hunk ./src/allmydata/web/root.py 316
182-            T.div["Filename to download as: ",
183+            T.div["Filename to download as:"+SPACE,
184                   T.input(type="text", name="filename")],
185             T.input(type="submit", value="Download!"),
186             ]]
187hunk ./src/allmydata/web/root.py 329
188                       enctype="multipart/form-data")[
189             T.fieldset[
190             T.legend(class_="freeform-form-label")["View a file or directory"],
191-            "Tahoe-URI to view: ",
192-            T.input(type="text", name="uri"), " ",
193+            "Tahoe-URI to view:"+SPACE,
194+            T.input(type="text", name="uri"), SPACE*2,
195             T.input(type="submit", value="View!"),
196             ]]
197         return T.div[form]
198hunk ./src/allmydata/web/root.py 336
199 
200     def render_upload_form(self, ctx, data):
201-        # this is a form where users can upload unlinked files
202-        #
203-        # for mutable files, users can choose the format by selecting
204-        # MDMF or SDMF from a radio button. They can also configure a
205-        # default format in tahoe.cfg, which they rightly expect us to
206-        # obey. we convey to them that we are obeying their choice by
207-        # ensuring that the one that they've chosen is selected in the
208-        # interface.
209-        if self.client.mutable_file_default == MDMF_VERSION:
210-            mdmf_input = T.input(type='radio', name='mutable-type',
211-                                 value='mdmf', id='mutable-type-mdmf',
212-                                 checked='checked')
213-        else:
214-            mdmf_input = T.input(type='radio', name='mutable-type',
215-                                 value='mdmf', id='mutable-type-mdmf')
216-
217-        if self.client.mutable_file_default == SDMF_VERSION:
218-            sdmf_input = T.input(type='radio', name='mutable-type',
219-                                 value='sdmf', id='mutable-type-sdmf',
220-                                 checked='checked')
221-        else:
222-            sdmf_input = T.input(type='radio', name='mutable-type',
223-                                 value='sdmf', id='mutable-type-sdmf')
224+        # This is a form where users can upload unlinked files.
225+        # Users can choose immutable, SDMF, or MDMF from a radio button.
226 
227hunk ./src/allmydata/web/root.py 339
228+        upload_chk  = T.input(type='radio', name='format',
229+                              value='chk', id='upload-chk',
230+                              checked='checked')
231+        upload_sdmf = T.input(type='radio', name='format',
232+                              value='sdmf', id='upload-sdmf')
233+        upload_mdmf = T.input(type='radio', name='format',
234+                              value='mdmf', id='upload-mdmf')
235 
236         form = T.form(action="uri", method="post",
237                       enctype="multipart/form-data")[
238hunk ./src/allmydata/web/root.py 351
239             T.fieldset[
240             T.legend(class_="freeform-form-label")["Upload a file"],
241-            T.div["Choose a file: ",
242+            T.div["Choose a file:"+SPACE,
243                   T.input(type="file", name="file", class_="freeform-input-file")],
244             T.input(type="hidden", name="t", value="upload"),
245hunk ./src/allmydata/web/root.py 354
246-            T.div[T.input(type="checkbox", name="mutable"), T.label(for_="mutable")["Create mutable file"],
247-                  sdmf_input, T.label(for_="mutable-type-sdmf")["SDMF"],
248-                  mdmf_input,
249-                  T.label(for_='mutable-type-mdmf')['MDMF (experimental)'],
250-                  " ", T.input(type="submit", value="Upload!")],
251+            T.div[upload_chk,  T.label(for_="upload-chk") [" Immutable"],           SPACE,
252+                  upload_sdmf, T.label(for_="upload-sdmf")[" SDMF"],                SPACE,
253+                  upload_mdmf, T.label(for_="upload-mdmf")[" MDMF (experimental)"], SPACE*2,
254+                  T.input(type="submit", value="Upload!")],
255             ]]
256         return T.div[form]
257 
258hunk ./src/allmydata/web/root.py 362
259     def render_mkdir_form(self, ctx, data):
260-        # this is a form where users can create new directories
261-        mdmf_input = T.input(type='radio', name='mutable-type',
262-                             value='mdmf', id='mutable-directory-mdmf')
263-        sdmf_input = T.input(type='radio', name='mutable-type',
264-                             value='sdmf', id='mutable-directory-sdmf',
265+        # This is a form where users can create new directories.
266+        # Users can choose SDMF or MDMF from a radio button.
267+
268+        mkdir_sdmf = T.input(type='radio', name='format',
269+                             value='sdmf', id='mkdir-sdmf',
270                              checked='checked')
271hunk ./src/allmydata/web/root.py 368
272+        mkdir_mdmf = T.input(type='radio', name='format',
273+                             value='mdmf', id='mkdir-mdmf')
274+
275         form = T.form(action="uri", method="post",
276                       enctype="multipart/form-data")[
277             T.fieldset[
278hunk ./src/allmydata/web/root.py 375
279             T.legend(class_="freeform-form-label")["Create a directory"],
280-            T.label(for_='mutable-directory-sdmf')["SDMF"],
281-            sdmf_input,
282-            T.label(for_='mutable-directory-mdmf')["MDMF"],
283-            mdmf_input,
284+            mkdir_sdmf, T.label(for_='mkdir-sdmf')[" SDMF"],                SPACE,
285+            mkdir_mdmf, T.label(for_='mkdir-mdmf')[" MDMF (experimental)"], SPACE*2,
286             T.input(type="hidden", name="t", value="mkdir"),
287             T.input(type="hidden", name="redirect_to_result", value="true"),
288             T.input(type="submit", value="Create a directory"),
289hunk ./src/allmydata/web/root.py 390
290             T.fieldset[
291             T.legend(class_="freeform-form-label")["Report an Incident"],
292             T.input(type="hidden", name="t", value="report-incident"),
293-            "What went wrong?: ",
294-            T.input(type="text", name="details"), " ",
295+            "What went wrong?:"+SPACE,
296+            T.input(type="text", name="details"), SPACE,
297             T.input(type="submit", value="Report!"),
298             ]]
299         return T.div[form]
300}
301
302Context:
303
304[docs/configuration.rst: add section about the types of node, and clarify when setting web.port enables web-API service. fixes #1444
305zooko@zooko.com**20110926203801
306 Ignore-this: ab94d470c68e720101a7ff3c207a719e
307]
308[TAG allmydata-tahoe-1.9.0a2
309warner@lothar.com**20110925234811
310 Ignore-this: e9649c58f9c9017a7d55008938dba64f
311]
312[NEWS: tidy up a little bit, reprioritize some items, hide some non-user-visible items
313warner@lothar.com**20110925233529
314 Ignore-this: 61f334cc3fa2539742c3e5d2801aee81
315]
316[test/test_runner.py: BinTahoe.test_path has rare nondeterministic failures; this patch probably fixes a problem where the actual cause of failure is masked by a string conversion error.
317david-sarah@jacaranda.org**20110927225336
318 Ignore-this: 6f1ad68004194cc9cea55ace3745e4af
319]
320[mutable/publish.py: fix an unused import. refs #1542
321david-sarah@jacaranda.org**20110925052206
322 Ignore-this: 2d69ac9e605e789c0aedfecb8877b7d7
323]
324[docs: fix some broken .rst links. refs #1542
325david-sarah@jacaranda.org**20110925051001
326 Ignore-this: 5714ee650abfcaab0914537e1f206972
327]
328[NEWS: fix .rst formatting.
329david-sarah@jacaranda.org**20110925050119
330 Ignore-this: aa1d20acd23bdb8f8f6d0fa048ea0277
331]
332[NEWS: updates for 1.9alpha2.
333david-sarah@jacaranda.org**20110925045343
334 Ignore-this: d2c44e4e05d2ed662b7adfd2e43928bc
335]
336[mutable/layout.py: make unpack_sdmf_checkstring and unpack_mdmf_checkstring more similar, and change an assert to give a more useful message if it fails. refs #1540
337david-sarah@jacaranda.org**20110925023651
338 Ignore-this: 977aaa8cb16e06a6dcc3e27cb6e23956
339]
340[mutable/publish: handle unknown mutable share formats when handling errors
341kevan@isnotajoke.com**20110925004305
342 Ignore-this: 4d5fa44ef7d777c432eb10c9584ad51f
343]
344[mutable/layout: break unpack_checkstring into unpack_mdmf_checkstring and unpack_sdmf_checkstring, add distinguisher function for checkstrings
345kevan@isnotajoke.com**20110925004134
346 Ignore-this: 57f49ed5a72e418a69c7286a225cc8fb
347]
348[test/test_mutable: reenable mdmf publish surprise test
349kevan@isnotajoke.com**20110924235415
350 Ignore-this: f752e47a703684491305cc83d16248fb
351]
352[mutable/publish: use unpack_mdmf_checkstring and unpack_sdmf_checkstring instead of unpack_checkstring. fixes #1540
353kevan@isnotajoke.com**20110924235137
354 Ignore-this: 52ca3d9627b8b0ba758367b2bd6c7085
355]
356[control.py: unbreak speed-test: overwrite() wants a MutableData, not str
357Brian Warner <warner@lothar.com>**20110923073748
358 Ignore-this: 7dad7aff3d66165868a64ae22d225fa3
359 
360 Really, all the upload/modify APIs should take a string or a filehandle, and
361 internally wrap it as needed. Callers should not need to be aware of
362 Uploadable() or MutableData() classes.
363]
364[misc/coding_tools/check_interfaces.py: report all violations rather than only one for a given class, by including a forked version of verifyClass. refs #1474
365david-sarah@jacaranda.org**20110916223450
366 Ignore-this: 927efeecf4d12588316826a4b3479aa9
367]
368[misc/coding_tools/check_interfaces.py: use os.walk instead of FilePath, since this script shouldn't really depend on Twisted. refs #1474
369david-sarah@jacaranda.org**20110916212633
370 Ignore-this: 46eeb4236b34375227dac71ef53f5428
371]
372[misc/coding_tools/check-interfaces.py: reduce false-positives by adding Dummy* to the set of excluded classnames, and bench-* to the set of excluded basenames. refs #1474
373david-sarah@jacaranda.org**20110916212624
374 Ignore-this: 4e78f6e6fe6c0e9be9df826a0e206804
375]
376[Add a script 'misc/coding_tools/check-interfaces.py' that checks whether zope interfaces are enforced. Also add 'check-interfaces', 'version-and-path', and 'code-checks' targets to the Makefile. fixes #1474
377david-sarah@jacaranda.org**20110915161532
378 Ignore-this: 32d9bdc5bc4a86d21e927724560ad4b4
379]
380[mutable/publish.py: copy the self.writers dict before iterating over it, since we remove elements from it during the iteration. refs #393
381david-sarah@jacaranda.org**20110924211208
382 Ignore-this: 76d4066b55d50ace2a34b87443b39094
383]
384[mutable/publish.py: simplify by refactoring self.outstanding to self.num_outstanding. refs #393
385david-sarah@jacaranda.org**20110924205004
386 Ignore-this: 902768cfc529ae13ae0b7f67768a3643
387]
388[test_mutable.py: update SkipTest message for test_publish_surprise_mdmf to reference the right ticket number. refs #1540.
389david-sarah@jacaranda.org**20110923211622
390 Ignore-this: 44f16a6817a6b75930bbba18b0a516be
391]
392[test_mutable.py: skip test_publish_surprise_mdmf, which is causing an error. refs #1534, #393
393david-sarah@jacaranda.org**20110920183319
394 Ignore-this: 6fb020e09e8de437cbcc2c9f57835b31
395]
396[test/test_mutable: write publish surprise test for MDMF, rename existing test_publish_surprise to clarify that it is for SDMF
397kevan@isnotajoke.com**20110918003657
398 Ignore-this: 722c507e8f5b537ff920e0555951059a
399]
400[test/test_mutable: refactor publish surprise test into common test fixture, rewrite test_publish_surprise to use test fixture
401kevan@isnotajoke.com**20110918003533
402 Ignore-this: 6f135888d400a99a09b5f9a4be443b6e
403]
404[mutable/publish: add errback immediately after write, don't consume errors from other parts of the publisher
405kevan@isnotajoke.com**20110917234708
406 Ignore-this: 12bf6b0918a5dc5ffc30ece669fad51d
407]
408[.darcs-boringfile: minor cleanups.
409david-sarah@jacaranda.org**20110920154918
410 Ignore-this: cab78e30d293da7e2832207dbee2ffeb
411]
412[uri.py: fix two interface violations in verifier URI classes. refs #1474
413david-sarah@jacaranda.org**20110920030156
414 Ignore-this: 454ddd1419556cb1d7576d914cb19598
415]
416[Make platform-detection code tolerate linux-3.0, patch by zooko.
417Brian Warner <warner@lothar.com>**20110915202620
418 Ignore-this: af63cf9177ae531984dea7a1cad03762
419 
420 Otherwise address-autodetection can't find ifconfig. refs #1536
421]
422[test_web.py: fix a bug in _count_leases that was causing us to check only the lease count of one share file, not of all share files as intended.
423david-sarah@jacaranda.org**20110915185126
424 Ignore-this: d96632bc48d770b9b577cda1bbd8ff94
425]
426[docs: insert a newline at the beginning of known_issues.rst to see if this makes it render more nicely in trac
427zooko@zooko.com**20110914064728
428 Ignore-this: aca15190fa22083c5d4114d3965f5d65
429]
430[docs: remove the coding: utf-8 declaration at the to of known_issues.rst, since the trac rendering doesn't hide it
431zooko@zooko.com**20110914055713
432 Ignore-this: 941ed32f83ead377171aa7a6bd198fcf
433]
434[docs: more cleanup of known_issues.rst -- now it passes "rst2html --verbose" without comment
435zooko@zooko.com**20110914055419
436 Ignore-this: 5505b3d76934bd97d0312cc59ed53879
437]
438[docs: more formatting improvements to known_issues.rst
439zooko@zooko.com**20110914051639
440 Ignore-this: 9ae9230ec9a38a312cbacaf370826691
441]
442[docs: reformatting of known_issues.rst
443zooko@zooko.com**20110914050240
444 Ignore-this: b8be0375079fb478be9d07500f9aaa87
445]
446[docs: fix formatting error in docs/known_issues.rst
447zooko@zooko.com**20110914045909
448 Ignore-this: f73fe74ad2b9e655aa0c6075acced15a
449]
450[merge Tahoe-LAFS v1.8.3 release announcement with trunk
451zooko@zooko.com**20110913210544
452 Ignore-this: 163f2c3ddacca387d7308e4b9332516e
453]
454[docs: release notes for Tahoe-LAFS v1.8.3
455zooko@zooko.com**20110913165826
456 Ignore-this: 84223604985b14733a956d2fbaeb4e9f
457]
458[tests: bump up the timeout in this test that fails on FreeStorm's CentOS in order to see if it is just very slow
459zooko@zooko.com**20110913024255
460 Ignore-this: 6a86d691e878cec583722faad06fb8e4
461]
462[interfaces: document that the 'fills-holes-with-zero-bytes' key should be used to detect whether a storage server has that behavior. refs #1528
463david-sarah@jacaranda.org**20110913002843
464 Ignore-this: 1a00a6029d40f6792af48c5578c1fd69
465]
466[CREDITS: more CREDITS for Kevan and David-Sarah
467zooko@zooko.com**20110912223357
468 Ignore-this: 4ea8f0d6f2918171d2f5359c25ad1ada
469]
470[merge NEWS about the mutable file bounds fixes with NEWS about work-in-progress
471zooko@zooko.com**20110913205521
472 Ignore-this: 4289a4225f848d6ae6860dd39bc92fa8
473]
474[doc: add NEWS item about fixes to potential palimpsest issues in mutable files
475zooko@zooko.com**20110912223329
476 Ignore-this: 9d63c95ddf95c7d5453c94a1ba4d406a
477 ref. #1528
478]
479[merge the NEWS about the security fix (#1528) with the work-in-progress NEWS
480zooko@zooko.com**20110913205153
481 Ignore-this: 88e88a2ad140238c62010cf7c66953fc
482]
483[doc: add NEWS entry about the issue which allows unauthorized deletion of shares
484zooko@zooko.com**20110912223246
485 Ignore-this: 77e06d09103d2ef6bb51ea3e5d6e80b0
486 ref. #1528
487]
488[doc: add entry in known_issues.rst about the issue which allows unauthorized deletion of shares
489zooko@zooko.com**20110912223135
490 Ignore-this: b26c6ea96b6c8740b93da1f602b5a4cd
491 ref. #1528
492]
493[storage: more paranoid handling of bounds and palimpsests in mutable share files
494zooko@zooko.com**20110912222655
495 Ignore-this: a20782fa423779ee851ea086901e1507
496 * storage server ignores requests to extend shares by sending a new_length
497 * storage server fills exposed holes (created by sending a write vector whose offset begins after the end of the current data) with 0 to avoid "palimpsest" exposure of previous contents
498 * storage server zeroes out lease info at the old location when moving it to a new location
499 ref. #1528
500]
501[storage: test that the storage server ignores requests to extend shares by sending a new_length, and that the storage server fills exposed holes with 0 to avoid "palimpsest" exposure of previous contents
502zooko@zooko.com**20110912222554
503 Ignore-this: 61ebd7b11250963efdf5b1734a35271
504 ref. #1528
505]
506[immutable: prevent clients from reading past the end of share data, which would allow them to learn the cancellation secret
507zooko@zooko.com**20110912222458
508 Ignore-this: da1ebd31433ea052087b75b2e3480c25
509 Declare explicitly that we prevent this problem in the server's version dict.
510 fixes #1528 (there are two patches that are each a sufficient fix to #1528 and this is one of them)
511]
512[storage: remove the storage server's "remote_cancel_lease" function
513zooko@zooko.com**20110912222331
514 Ignore-this: 1c32dee50e0981408576daffad648c50
515 We're removing this function because it is currently unused, because it is dangerous, and because the bug described in #1528 leaks the cancellation secret, which allows anyone who knows a file's storage index to abuse this function to delete shares of that file.
516 fixes #1528 (there are two patches that are each a sufficient fix to #1528 and this is one of them)
517]
518[storage: test that the storage server does *not* have a "remote_cancel_lease" function
519zooko@zooko.com**20110912222324
520 Ignore-this: 21c652009704652d35f34651f98dd403
521 We're removing this function because it is currently unused, because it is dangerous, and because the bug described in #1528 leaks the cancellation secret, which allows anyone who knows a file's storage index to abuse this function to delete shares of that file.
522 ref. #1528
523]
524[immutable: test whether the server allows clients to read past the end of share data, which would allow them to learn the cancellation secret
525zooko@zooko.com**20110912221201
526 Ignore-this: 376e47b346c713d37096531491176349
527 Also test whether the server explicitly declares that it prevents this problem.
528 ref #1528
529]
530[Retrieve._activate_enough_peers: rewrite Verify logic
531Brian Warner <warner@lothar.com>**20110909181150
532 Ignore-this: 9367c11e1eacbf025f75ce034030d717
533]
534[Retrieve: implement/test stopProducing
535Brian Warner <warner@lothar.com>**20110909181150
536 Ignore-this: 47b2c3df7dc69835e0a066ca12e3c178
537]
538[move DownloadStopped from download.common to interfaces
539Brian Warner <warner@lothar.com>**20110909181150
540 Ignore-this: 8572acd3bb16e50341dbed8eb1d90a50
541]
542[retrieve.py: remove vestigal self._validated_readers
543Brian Warner <warner@lothar.com>**20110909181150
544 Ignore-this: faab2ec14e314a53a2ffb714de626e2d
545]
546[Retrieve: rewrite flow-control: use a top-level loop() to catch all errors
547Brian Warner <warner@lothar.com>**20110909181150
548 Ignore-this: e162d2cd53b3d3144fc6bc757e2c7714
549 
550 This ought to close the potential for dropped errors and hanging downloads.
551 Verify needs to be examined, I may have broken it, although all tests pass.
552]
553[Retrieve: merge _validate_active_prefixes into _add_active_peers
554Brian Warner <warner@lothar.com>**20110909181150
555 Ignore-this: d3ead31e17e69394ae7058eeb5beaf4c
556]
557[Retrieve: remove the initial prefix-is-still-good check
558Brian Warner <warner@lothar.com>**20110909181150
559 Ignore-this: da66ee51c894eaa4e862e2dffb458acc
560 
561 This check needs to be done with each fetch from the storage server, to
562 detect when someone has changed the share (i.e. our servermap goes stale).
563 Doing it just once at the beginning of retrieve isn't enough: a write might
564 occur after the first segment but before the second, etc.
565 
566 _try_to_validate_prefix() was not removed: it will be used by the future
567 check-with-each-fetch code.
568 
569 test_mutable.Roundtrip.test_corrupt_all_seqnum_late was disabled, since it
570 fails until this check is brought back. (the corruption it applies only
571 touches the prefix, not the block data, so the check-less retrieve actually
572 tolerates it). Don't forget to re-enable it once the check is brought back.
573]
574[MDMFSlotReadProxy: remove the queue
575Brian Warner <warner@lothar.com>**20110909181150
576 Ignore-this: 96673cb8dda7a87a423de2f4897d66d2
577 
578 This is a neat trick to reduce Foolscap overhead, but the need for an
579 explicit flush() complicates the Retrieve path and makes it prone to
580 lost-progress bugs.
581 
582 Also change test_mutable.FakeStorageServer to tolerate multiple reads of the
583 same share in a row, a limitation exposed by turning off the queue.
584]
585[rearrange Retrieve: first step, shouldn't change order of execution
586Brian Warner <warner@lothar.com>**20110909181149
587 Ignore-this: e3006368bfd2802b82ea45c52409e8d6
588]
589[CLI: test_cli.py -- remove an unnecessary call in test_mkdir_mutable_type. refs #1527
590david-sarah@jacaranda.org**20110906183730
591 Ignore-this: 122e2ffbee84861c32eda766a57759cf
592]
593[CLI: improve test for 'tahoe mkdir --mutable-type='. refs #1527
594david-sarah@jacaranda.org**20110906183020
595 Ignore-this: f1d4598e6c536f0a2b15050b3bc0ef9d
596]
597[CLI: make the --mutable-type option value for 'tahoe put' and 'tahoe mkdir' case-insensitive, and change --help for these commands accordingly. fixes #1527
598david-sarah@jacaranda.org**20110905020922
599 Ignore-this: 75a6df0a2df9c467d8c010579e9a024e
600]
601[cli: make --mutable-type imply --mutable in 'tahoe put'
602Kevan Carstensen <kevan@isnotajoke.com>**20110903190920
603 Ignore-this: 23336d3c43b2a9554e40c2a11c675e93
604]
605[SFTP: add a comment about a subtle interaction between OverwriteableFileConsumer and GeneralSFTPFile, and test the case it is commenting on.
606david-sarah@jacaranda.org**20110903222304
607 Ignore-this: 980c61d4dd0119337f1463a69aeebaf0
608]
609[improve the storage/mutable.py asserts even more
610warner@lothar.com**20110901160543
611 Ignore-this: 5b2b13c49bc4034f96e6e3aaaa9a9946
612]
613[storage/mutable.py: special characters in struct.foo arguments indicate standard as opposed to native sizes, we should be using these characters in these asserts
614wilcoxjg@gmail.com**20110901084144
615 Ignore-this: 28ace2b2678642e4d7269ddab8c67f30
616]
617[docs/write_coordination.rst: fix formatting and add more specific warning about access via sshfs.
618david-sarah@jacaranda.org**20110831232148
619 Ignore-this: cd9c851d3eb4e0a1e088f337c291586c
620]
621[test_mutable.Version: consolidate some tests, reduce runtime from 19s to 15s
622warner@lothar.com**20110831050451
623 Ignore-this: 64815284d9e536f8f3798b5f44cf580c
624]
625[mutable/retrieve: handle the case where self._read_length is 0.
626Kevan Carstensen <kevan@isnotajoke.com>**20110830210141
627 Ignore-this: fceafbe485851ca53f2774e5a4fd8d30
628 
629 Note that the downloader will still fetch a segment for a zero-length
630 read, which is wasteful. Fixing that isn't specifically required to fix
631 #1512, but it should probably be fixed before 1.9.
632]
633[NEWS: added summary of all changes since 1.8.2. Needs editing.
634Brian Warner <warner@lothar.com>**20110830163205
635 Ignore-this: 273899b37a899fc6919b74572454b8b2
636]
637[test_mutable.Update: only upload the files needed for each test. refs #1500
638Brian Warner <warner@lothar.com>**20110829072717
639 Ignore-this: 4d2ab4c7523af9054af7ecca9c3d9dc7
640 
641 This first step shaves 15% off the runtime: from 139s to 119s on my laptop.
642 It also fixes a couple of places where a Deferred was being dropped, which
643 would cause two tests to run in parallel and also confuse error reporting.
644]
645[Let Uploader retain History instead of passing it into upload(). Fixes #1079.
646Brian Warner <warner@lothar.com>**20110829063246
647 Ignore-this: 3902c58ec12bd4b2d876806248e19f17
648 
649 This consistently records all immutable uploads in the Recent Uploads And
650 Downloads page, regardless of code path. Previously, certain webapi upload
651 operations (like PUT /uri/$DIRCAP/newchildname) failed to pass the History
652 object and were left out.
653]
654[Fix mutable publish/retrieve timing status displays. Fixes #1505.
655Brian Warner <warner@lothar.com>**20110828232221
656 Ignore-this: 4080ce065cf481b2180fd711c9772dd6
657 
658 publish:
659 * encrypt and encode times are cumulative, not just current-segment
660 
661 retrieve:
662 * same for decrypt and decode times
663 * update "current status" to include segment number
664 * set status to Finished/Failed when download is complete
665 * set progress to 1.0 when complete
666 
667 More improvements to consider:
668 * progress is currently 0% or 100%: should calculate how many segments are
669   involved (remembering retrieve can be less than the whole file) and set it
670   to a fraction
671 * "fetch" time is fuzzy: what we want is to know how much of the delay is not
672   our own fault, but since we do decode/decrypt work while waiting for more
673   shares, it's not straightforward
674]
675[Teach 'tahoe debug catalog-shares about MDMF. Closes #1507.
676Brian Warner <warner@lothar.com>**20110828080931
677 Ignore-this: 56ef2951db1a648353d7daac6a04c7d1
678]
679[debug.py: remove some dead comments
680Brian Warner <warner@lothar.com>**20110828074556
681 Ignore-this: 40e74040dd4d14fd2f4e4baaae506b31
682]
683[hush pyflakes
684Brian Warner <warner@lothar.com>**20110828074254
685 Ignore-this: bef9d537a969fa82fe4decc4ba2acb09
686]
687[MutableFileNode.set_downloader_hints: never depend upon order of dict.values()
688Brian Warner <warner@lothar.com>**20110828074103
689 Ignore-this: caaf1aa518dbdde4d797b7f335230faa
690 
691 The old code was calculating the "extension parameters" (a list) from the
692 downloader hints (a dictionary) with hints.values(), which is not stable, and
693 would result in corrupted filecaps (with the 'k' and 'segsize' hints
694 occasionally swapped). The new code always uses [k,segsize].
695]
696[layout.py: fix MDMF share layout documentation
697Brian Warner <warner@lothar.com>**20110828073921
698 Ignore-this: 3f13366fed75b5e31b51ae895450a225
699]
700[teach 'tahoe debug dump-share' about MDMF and offsets. refs #1507
701Brian Warner <warner@lothar.com>**20110828073834
702 Ignore-this: 3a9d2ef9c47a72bf1506ba41199a1dea
703]
704[test_mutable.Version.test_debug: use splitlines() to fix buildslaves
705Brian Warner <warner@lothar.com>**20110828064728
706 Ignore-this: c7f6245426fc80b9d1ae901d5218246a
707 
708 Any slave running in a directory with spaces in the name was miscounting
709 shares, causing the test to fail.
710]
711[test_mutable.Version: exercise 'tahoe debug find-shares' on MDMF. refs #1507
712Brian Warner <warner@lothar.com>**20110828005542
713 Ignore-this: cb20bea1c28bfa50a72317d70e109672
714 
715 Also changes NoNetworkGrid to put shares in storage/shares/ .
716]
717[test_mutable.py: oops, missed a .todo
718Brian Warner <warner@lothar.com>**20110828002118
719 Ignore-this: fda09ae86481352b7a627c278d2a3940
720]
721[test_mutable: merge davidsarah's patch with my Version refactorings
722warner@lothar.com**20110827235707
723 Ignore-this: b5aaf481c90d99e33827273b5d118fd0
724]
725[Make the immutable/read-only constraint checking for MDMF URIs identical to that for SSK URIs. refs #393
726david-sarah@jacaranda.org**20110823012720
727 Ignore-this: e1f59d7ff2007c81dbef2aeb14abd721
728]
729[Additional tests for MDMF URIs and for zero-length files. refs #393
730david-sarah@jacaranda.org**20110823011532
731 Ignore-this: a7cc0c09d1d2d72413f9cd227c47a9d5
732]
733[Additional tests for zero-length partial reads and updates to mutable versions. refs #393
734david-sarah@jacaranda.org**20110822014111
735 Ignore-this: 5fc6f4d06e11910124e4a277ec8a43ea
736]
737[test_mutable.Version: factor out some expensive uploads, save 25% runtime
738Brian Warner <warner@lothar.com>**20110827232737
739 Ignore-this: ea37383eb85ea0894b254fe4dfb45544
740]
741[SDMF: update filenode with correct k/N after Retrieve. Fixes #1510.
742Brian Warner <warner@lothar.com>**20110827225031
743 Ignore-this: b50ae6e1045818c400079f118b4ef48
744 
745 Without this, we get a regression when modifying a mutable file that was
746 created with more shares (larger N) than our current tahoe.cfg . The
747 modification attempt creates new versions of the (0,1,..,newN-1) shares, but
748 leaves the old versions of the (newN,..,oldN-1) shares alone (and throws a
749 assertion error in SDMFSlotWriteProxy.finish_publishing in the process).
750 
751 The mixed versions that result (some shares with e.g. N=10, some with N=20,
752 such that both versions are recoverable) cause problems for the Publish code,
753 even before MDMF landed. Might be related to refs #1390 and refs #1042.
754]
755[layout.py: annotate assertion to figure out 'tahoe backup' failure
756Brian Warner <warner@lothar.com>**20110827195253
757 Ignore-this: 9b92b954e3ed0d0f80154fff1ff674e5
758]
759[Add 'tahoe debug dump-cap' support for MDMF, DIR2-CHK, DIR2-MDMF. refs #1507.
760Brian Warner <warner@lothar.com>**20110827195048
761 Ignore-this: 61c6af5e33fc88e0251e697a50addb2c
762 
763 This also adds tests for all those cases, and fixes an omission in uri.py
764 that broke parsing of DIR2-MDMF-Verifier and DIR2-CHK-Verifier.
765]
766[MDMF: more writable/writeable consistentifications
767warner@lothar.com**20110827190602
768 Ignore-this: 22492a9e20c1819ddb12091062888b55
769]
770[MDMF: s/Writable/Writeable/g, for consistency with existing SDMF code
771warner@lothar.com**20110827183357
772 Ignore-this: 9dd312acedbdb2fc2f7bef0d0fb17c0b
773]
774[setup.cfg: remove no-longer-supported test_mac_diskimage alias. refs #1479
775david-sarah@jacaranda.org**20110826230345
776 Ignore-this: 40e908b8937322a290fb8012bfcad02a
777]
778[test_mutable.Update: increase timeout from 120s to 400s, slaves are failing
779Brian Warner <warner@lothar.com>**20110825230140
780 Ignore-this: 101b1924a30cdbda9b2e419e95ca15ec
781]
782[tests: fix check_memory test
783zooko@zooko.com**20110825201116
784 Ignore-this: 4d66299fa8cb61d2ca04b3f45344d835
785 fixes #1503
786]
787[TAG allmydata-tahoe-1.9.0a1
788warner@lothar.com**20110825161122
789 Ignore-this: 3cbf49f00dbda58189f893c427f65605
790]
791Patch bundle hash:
7929b2ac1a1ce5b9a498bee97626e4f4f234236cfdb