Ticket #1305: fix-1305.darcs.patch

File fix-1305.darcs.patch, 15.5 KB (added by davidsarah, at 2011-01-14T04:18:00Z)

CLI: make 'tahoe create-alias' and 'tahoe add-alias' accept a trailing colon on the new alias name (v2, minor change not to rely on implicit Unicode conversion). Includes doc changes and news; tests in a separate patch. fixes #1305

Line 
11 patch for repository davidsarah@dev.allmydata.org:/home/darcs/tahoe/trunk:
2
3Fri Jan 14 03:44:14 GMT Standard Time 2011  david-sarah@jacaranda.org
4  * CLI: make 'tahoe create-alias' and 'tahoe add-alias' accept a trailing colon on the new alias name (v2, minor change not to rely on implicit Unicode conversion). Includes doc changes and news; tests in a separate patch. fixes #1305
5
6New patches:
7
8[CLI: make 'tahoe create-alias' and 'tahoe add-alias' accept a trailing colon on the new alias name (v2, minor change not to rely on implicit Unicode conversion). Includes doc changes and news; tests in a separate patch. fixes #1305
9david-sarah@jacaranda.org**20110114034414
10 Ignore-this: 97e8e88d8b0f7c628b77db3adb67fa1b
11] {
12hunk ./NEWS 10
13  - 'top' on some Unix platforms, e.g. Linux, now shows node processes as
14    'tahoe' instead of 'python'. (#174)
15  - Improve HTML formatting of the WUI. (#1219)
16+ - The 'tahoe create-alias' and 'tahoe add-alias' commands now accept a
17+   trailing colon on the alias. (#1305)
18 
19 ** Removals
20 
21hunk ./docs/frontends/CLI.rst 250
22 Command Syntax Summary
23 ----------------------
24 
25-``tahoe add-alias ALIAS DIRCAP``
26+``tahoe add-alias ALIAS[:] DIRCAP``
27 
28hunk ./docs/frontends/CLI.rst 252
29-``tahoe create-alias ALIAS``
30+``tahoe create-alias ALIAS[:]``
31 
32 ``tahoe list-aliases``
33 
34hunk ./docs/frontends/CLI.rst 293
35 Command Examples
36 ----------------
37 
38-``tahoe add-alias ALIAS DIRCAP``
39+``tahoe add-alias ALIAS[:] DIRCAP``
40 
41  An example would be::
42 
43hunk ./docs/frontends/CLI.rst 304
44  directory. Use "``tahoe add-alias tahoe DIRCAP``" to set the contents of the
45  default ``tahoe:`` alias.
46 
47+ Since Tahoe-LAFS v1.8.2, the alias name can be given with or without the
48+ trailing colon.
49+
50 ``tahoe create-alias fun``
51 
52  This combines "``tahoe mkdir``" and "``tahoe add-alias``" into a single step.
53hunk ./src/allmydata/scripts/cli.py 60
54 class AddAliasOptions(VDriveOptions):
55     def parseArgs(self, alias, cap):
56         self.alias = argv_to_unicode(alias)
57+        if self.alias.endswith(u':'):
58+            self.alias = self.alias[:-1]
59         self.cap = cap
60 
61     def getSynopsis(self):
62hunk ./src/allmydata/scripts/cli.py 65
63-        return "%s add-alias ALIAS DIRCAP" % (os.path.basename(sys.argv[0]),)
64+        return "%s add-alias ALIAS[:] DIRCAP" % (os.path.basename(sys.argv[0]),)
65 
66     longdesc = """Add a new alias for an existing directory."""
67 
68hunk ./src/allmydata/scripts/cli.py 72
69 class CreateAliasOptions(VDriveOptions):
70     def parseArgs(self, alias):
71         self.alias = argv_to_unicode(alias)
72+        if self.alias.endswith(u':'):
73+            self.alias = self.alias[:-1]
74 
75     def getSynopsis(self):
76hunk ./src/allmydata/scripts/cli.py 76
77-        return "%s create-alias ALIAS" % (os.path.basename(sys.argv[0]),)
78+        return "%s create-alias ALIAS[:]" % (os.path.basename(sys.argv[0]),)
79 
80     longdesc = """Create a new directory and add an alias for it."""
81 
82hunk ./src/allmydata/scripts/tahoe_add_alias.py 35
83     cap = options.cap
84     stdout = options.stdout
85     stderr = options.stderr
86-    assert ":" not in alias
87-    assert " " not in alias
88+    if u":" in alias:
89+        # a single trailing colon will already have been stripped if present
90+        print >>stderr, "Alias names cannot contain colons."
91+        return 1
92+    if u" " in alias:
93+        print >>stderr, "Alias names cannot contain spaces."
94+        return 1
95 
96     old_aliases = get_aliases(nodedir)
97     if alias in old_aliases:
98hunk ./src/allmydata/scripts/tahoe_add_alias.py 61
99     alias = options.alias
100     stdout = options.stdout
101     stderr = options.stderr
102-    assert ":" not in alias
103-    assert " " not in alias
104+    if u":" in alias:
105+        # a single trailing colon will already have been stripped if present
106+        print >>stderr, "Alias names cannot contain colons."
107+        return 1
108+    if u" " in alias:
109+        print >>stderr, "Alias names cannot contain spaces."
110+        return 1
111 
112     old_aliases = get_aliases(nodedir)
113     if alias in old_aliases:
114}
115
116Context:
117
118[bin/tahoe-script.template: improve the error message if we end up running under Python 3. refs #1302
119david-sarah@jacaranda.org**20110112211628
120 Ignore-this: ee78f8e4bbd197e620cb0cc6b995ac46
121]
122[Makefile: Fix uploading of tarballs on trunk builds.
123david-sarah@jacaranda.org**20110109065851
124 Ignore-this: 864b06e39103f46dbb6ccb74e1e333d3
125]
126[docs/frontends/CLI.rst: fix the rst syntax to be as actually intended :-)
127david-sarah@jacaranda.org**20110109014057
128 Ignore-this: c11331670ba89d8601ba3782ffc4f32c
129]
130[docs/frontends/CLI.rst: really fix rst syntax error this time.
131david-sarah@jacaranda.org**20110109013914
132 Ignore-this: 59550154c9ab41488ddfdee8938d7bda
133]
134[docs/frontends/CLI.rst: fix rst syntax error.
135david-sarah@jacaranda.org**20110109010943
136 Ignore-this: 427444f5572115059c75fa1bd8371d51
137]
138[docs/frontends/CLI.rst: discuss commandline/output quoting issues and wildcards. refs #1135
139david-sarah@jacaranda.org**20110109010119
140 Ignore-this: 533938d89be878b404a8540aebdf68ad
141]
142[setup.py: add Python 2.7 trove classifier.
143david-sarah@jacaranda.org**20110108211212
144 Ignore-this: b479c0a1adf9b7a2d1fdc54abc6582e6
145]
146[docs/FTP-and-SFTP.rst: document issue in ref #1297. Remove known issue #1045 which is fixed. Also some cosmetic changes.
147david-sarah@jacaranda.org**20110108061038
148 Ignore-this: 8d9aa2e33f1054545f7bed47bf0e647d
149]
150[misc/build_helpers/show-tool-versions.py: remove attempts to show stdout.encoding and stderr.encoding that always printed None due to redirection. Also remove code to show os.path.supports_unicode_filenames which is not useful. refs #1251
151david-sarah@jacaranda.org**20110103015144
152 Ignore-this: 45e11431f7e2e0cebcb58e1841485cf8
153]
154[NEWS: 'top' for node processes, WUI formatting, removal of GUI apps, documentation updates, foolscap dependency. refs #174, #1219, #1225
155david-sarah@jacaranda.org**20110106005727
156 Ignore-this: f61ac58b4d10e635feb6f7391b1b48fe
157]
158[Makefile: update 'clean' target for files in bin/
159david-sarah@jacaranda.org**20110103052738
160 Ignore-this: 2bdbc4a50e13e508b66d0f65718c79b2
161]
162[docs: update performance.rst to describe the difference between already-uploaded and not-already-uploaded, to parameterize segment size, and to use "~A" to mean "approximately A"
163zooko@zooko.com**20110104065455
164 Ignore-this: 8df0d79a062ee19854c0211bd202f606
165]
166[bin/tahoe-script.template: On non-Windows, invoke support/bin/tahoe directly as a script (rather than via python), so that 'top' for example will show it as 'tahoe'. On Windows, simplify some code that set argv[0], which is never used. fixes #174
167david-sarah@jacaranda.org**20101127232650
168 Ignore-this: 42a86f3eecfdc1ea7b76a7cc68626898
169]
170[test_runner: avoid unnecessary use of non-ASCII.
171david-sarah@jacaranda.org**20110101100101
172 Ignore-this: e2ff40dce6bb3b021306f2913d4e75df
173]
174[docs/quickstart.html: fix redundant, badly nested tag. refs #1284
175david-sarah@jacaranda.org**20110102175159
176 Ignore-this: 2ae9cc0b47d2e87b9eb64a0f517c4eef
177]
178[docs/quickstart.html: information about 'troublesome dependencies' and 'verified systems' de-emphasized by smaller italic font. Re-wrap so that the HTML source is readable (just about) as text. Minor wording tweaks. Improve organization by adding 'Windows Caveats' subsection. fixes #1284
179david-sarah@jacaranda.org**20110102174212
180 Ignore-this: e9dc57983974478200856651c5318fee
181]
182[NEWS: update entry for removal of Mac and Windows apps. refs #1282
183david-sarah@jacaranda.org**20101226042245
184 Ignore-this: c8099bc6e8235718d042c9a13c1e2425
185]
186[Move dependency imports from windows/depends.py (which has gone away) into src/allmydata/windows/tahoesvc.py. Also fix a pyflakes warning, and change the service display name from 'Allmydata Tahoe Node' to 'Tahoe-LAFS node'. refs #1282
187david-sarah@jacaranda.org**20101226042100
188 Ignore-this: ee45f324934e1251380206dbee6346d0
189]
190[Remove unmaintained Windows GUI app, except for windows/tahoesvc.py which is moved to src/allmydata/windows. refs #1282
191david-sarah@jacaranda.org**20101226040237
192 Ignore-this: cae37b6622a7dd5940acc7d3e6a98b90
193]
194[Remove the Makefile targets relating to the Mac GUI app. refs #1282
195david-sarah@jacaranda.org**20101226025859
196 Ignore-this: 75303be783974b41138744ec62b07965
197]
198[NEWS: remove unmaintained Mac GUI app. refs #1282
199david-sarah@jacaranda.org**20101226020858
200 Ignore-this: 40474a07f4a550b48563d35350be7ab5
201]
202[Remove unmaintained Mac GUI app. fixes #1282
203david-sarah@jacaranda.org**20101226020508
204 Ignore-this: b3613bf1abfd284d542bf7c753ec557a
205]
206[Remove src/allmydata/util/find_exe.py which is no longer used. fixes #1150
207david-sarah@jacaranda.org**20101226023206
208 Ignore-this: 7436c9b53bf210aed34a1a973cd9cace
209]
210[status_web_pages_review.darcs.patch
211freestorm77@gmail.com**20110102034214
212 Ignore-this: 29f1ecb36177f10f3f846b3d56b313b2
213 
214 I make some changes on status web pages
215 
216 status.xhtml:
217 - Delete unused webform_css link
218 - Align tables on the left
219 
220 tahoe-css:
221 - Do some minor changes on code synthax
222 - changes table.status-download-events style to look like other tables
223 
224 status.py:
225 - Align table on the left
226 - Changes table header
227 - Add heading tags
228 - Modify google api graph: add image border, calculate height to feet data
229 
230 signed-off-by: zooko@zooko.com
231 fixes #1219
232]
233[test_storage.py: fix a pyflakes unused import warning.
234david-sarah@jacaranda.org**20101231220756
235 Ignore-this: df08231540cb7dff9d2b038e47ab30ee
236]
237[test_storage.py: leave at least 512 MiB free when running test_large_share. refs #1195
238david-sarah@jacaranda.org**20101231203215
239 Ignore-this: b2144c0341c3452b5d4ba219e284ea0e
240]
241[storage: use fileutil's version of get_disk_stats() and get_available_space(), use mockery/fakery in tests, enable large share test on platforms with sparse files and if > 4 GiB of disk space is currently available
242zooko@zooko.com**20100910173629
243 Ignore-this: 1304f1164c661de6d5304f993eb9b27b
244]
245[fileutil: copy in the get_disk_stats() and get_available_space() functions from storage/server.py
246zooko@zooko.com**20100910173520
247 Ignore-this: 8b15569715f710f4fc5092f7ca109253
248]
249[Update foolscap version requirement to 0.6.0, to address http://foolscap.lothar.com/trac/ticket/167
250david-sarah@jacaranda.org**20101231060039
251 Ignore-this: 98d2b8086a1a500b9f4565bca5a3810
252]
253[docs/webapi.rst: typos.
254david-sarah@jacaranda.org**20101230034422
255 Ignore-this: d1f5166d72cc711f7e0d9981eac9105e
256]
257[docs/webapi.rst: capitalization, formatting of section on URL character encoding, and a correction about Internet Explorer.
258david-sarah@jacaranda.org**20101230034049
259 Ignore-this: b3b9819d2fb264b4cdc5c8afd4e8c48d
260]
261[docs: corrections and clarifications.
262david-sarah@jacaranda.org**20101227051056
263 Ignore-this: e33202858c7644c58f3f924b164294b6
264]
265[docs: more formatting cleanups and corrections. Spell webapi and wapi as web-API.
266david-sarah@jacaranda.org**20101227050533
267 Ignore-this: 18b23cbfb780df585d8a722a1ec63e94
268]
269[docs/debian.rst: bring description of building dependencies from source up-to-date, and change hostname from allmydata.com to tahoe-lafs.org.
270david-sarah@jacaranda.org**20101212222912
271 Ignore-this: f38462afc88b4475195610385a28391c
272]
273[docs/architecture.rst: correct rst syntax.
274david-sarah@jacaranda.org**20101212202003
275 Ignore-this: 3fbe12feb28bec6f1c63aedbc79aad21
276]
277[docs/architecture.rst: formatting.
278david-sarah@jacaranda.org**20101212201719
279 Ignore-this: 305fa5dfc2939355eaf6d0d2161eb1ff
280]
281[docs: linkification, wording improvements.
282david-sarah@jacaranda.org**20101212201234
283 Ignore-this: 4e67287f527a8bc728cfbd93255d2aae
284]
285[docs: formatting.
286david-sarah@jacaranda.org**20101212201115
287 Ignore-this: 2e0ed394ac7726651d3a4f2c4b0d3798
288]
289[docs/configuration.rst: more formatting tweaks; which -> that.
290david-sarah@jacaranda.org**20101212195522
291 Ignore-this: a7becb7021854ca5a90edd892b36fdd7
292]
293[docs/configuration.rst: more changes to formatting.
294david-sarah@jacaranda.org**20101212194511
295 Ignore-this: 491aac33e5f5268d224359f1447d10be
296]
297[docs/configuration.rst: changes to formatting (mainly putting commands and filenames in monospace).
298david-sarah@jacaranda.org**20101212181828
299 Ignore-this: 8a1480e2d5f43bee678476424615b50f
300]
301[scripts/backupdb.py: more accurate comment about path field.
302david-sarah@jacaranda.org**20101212170320
303 Ignore-this: 50e47a2228a85207bbcd188a78a0d4e6
304]
305[scripts/cli.py: fix missing 'put' in usage example for 'tahoe put'.
306david-sarah@jacaranda.org**20101212170207
307 Ignore-this: 2cbadf066fff611fc03d3c0ff97ce6ec
308]
309[docs/frontends/CLI.rst: changes to formatting (mainly putting commands and filenames in monospace), and to command syntax to reflect that DIRCAP/... is accepted. Clarify the syntax of 'tahoe put' and other minor corrections. Tahoe -> Tahoe-LAFS.
310david-sarah@jacaranda.org**20101212165800
311 Ignore-this: a123ef6b564aa8624d1e79c97068ea12
312]
313[docs/frontends/CLI.rst: Unicode arguments to 'tahoe' work on Windows as of v1.7.1.
314david-sarah@jacaranda.org**20101212063740
315 Ignore-this: 3977a99dfa86ac33a44171deaf43aaab
316]
317[docs/known_issues.rst: fix title and linkify another URL. refs #1225
318david-sarah@jacaranda.org**20101212062817
319 Ignore-this: cc91287f7fb51c23440b3d2fe79c449c
320]
321[docs/known_issues.rst: fix an external link. refs #1225
322david-sarah@jacaranda.org**20101212062435
323 Ignore-this: b8cbf12f353131756c358965c48060ec
324]
325[Fix a link from uri.rst to dirnodes.rst. refs #1225
326david-sarah@jacaranda.org**20101212054502
327 Ignore-this: af6205299f5c9a33229cab259c00f9d5
328]
329[Fix a link from webapi.rst to FTP-and-SFTP.rst. refs #1225
330david-sarah@jacaranda.org**20101212053435
331 Ignore-this: 2b9f88678c3447ea860d6b61e8799858
332]
333[More specific hyperlink to architecture.rst from helper.rst. refs #1225
334david-sarah@jacaranda.org**20101212052607
335 Ignore-this: 50424c768fca481252fabf58424852dc
336]
337[Update hyperlinks between docs, and linkify some external references. refs #1225
338david-sarah@jacaranda.org**20101212051459
339 Ignore-this: cd43a4c3d3de1f832abfa88d5fc4ace1
340]
341[docs/specifications/dirnodes.rst: fix references to mutable.rst. refs #1225
342david-sarah@jacaranda.org**20101212012720
343 Ignore-this: 6819b4b4e06e947ee48b365e840db37d
344]
345[docs/specifications/mutable.rst: correct the magic string for v1 mutable containers. refs #1225
346david-sarah@jacaranda.org**20101212011400
347 Ignore-this: 99a5fcdd40cef83dbb08f323f6cdaaca
348]
349[Move .txt files in docs/frontends and docs/specifications to .rst. refs #1225
350david-sarah@jacaranda.org**20101212010251
351 Ignore-this: 8796d35d928370f7dc6ad2dafdc1c0fe
352]
353[Convert docs/frontends and docs/specifications to reStructuredText format (not including file moves).
354david-sarah@jacaranda.org**20101212004632
355 Ignore-this: e3ceb2d832d73875abe48624ddbb5622
356]
357[scripts/cli.py: remove the disclaimer in the help for 'tahoe cp' that it does not handle non-ASCII filenames well. (At least, we intend to handle them.)
358david-sarah@jacaranda.org**20101130002145
359 Ignore-this: 94c003efaa20b9eb4a83503d79844ca
360]
361[relnotes.txt: fifth -> sixth labor-of-love release
362zooko@zooko.com**20101129045647
363 Ignore-this: 21c245015268b38916e3a138d256c09d
364]
365[Makefile: BB_BRANCH is set to the empty string for trunk, not the string 'trunk'.
366david-sarah@jacaranda.org**20101128233512
367 Ignore-this: 5a7ef8eb10475636d21b91e25b56c369
368]
369[relnotes.txt: eleventh -> twelfth release.
370david-sarah@jacaranda.org**20101128223321
371 Ignore-this: 1e26410156a665271c1170803dea2c0d
372]
373[relnotes.tst: point to known_issues.rst, not known_issues.txt.
374david-sarah@jacaranda.org**20101128222918
375 Ignore-this: 60194eb4544cac446fe4f60b3e34b887
376]
377[quickstart.html: fix link to point to allmydata-tahoe-1.8.1.zip.
378david-sarah@jacaranda.org**20101128221728
379 Ignore-this: 7b3ee86f8256aa12f5d862f689f3ee29
380]
381[TAG allmydata-tahoe-1.8.1
382david-sarah@jacaranda.org**20101128212336
383 Ignore-this: 9c18bdeaef4822f590d2a0d879e00621
384]
385Patch bundle hash:
3867daadf9a69a30a4a5ecc06f3e2a93ba6e1a0dcb3