Ticket #776: rm-unlink-cleanup.darcs.patch

File rm-unlink-cleanup.darcs.patch, 36.9 KB (added by davidsarah, at 2011-07-25T00:15:38Z)

cleanup: implement rm as a synonym for unlink rather than vice-versa. refs #776 (This depends on the patch for #1359.)

Line 
12 patches for repository davidsarah@dev.allmydata.org:/home/darcs/tahoe/trunk:
2
3Sun Jul 24 23:54:40 BST 2011  david-sarah@jacaranda.org
4  * Fix the help synopses of CLI commands to include [options] in the right place. fixes #1359, fixes #636
5
6Mon Jul 25 00:13:38 BST 2011  david-sarah@jacaranda.org
7  * cleanup: implement rm as a synonym for unlink rather than vice-versa. refs #776
8
9New patches:
10
11[Fix the help synopses of CLI commands to include [options] in the right place. fixes #1359, fixes #636
12david-sarah@jacaranda.org**20110724225440
13 Ignore-this: 2a8e488a5f63dabfa9db9efd83768a5
14] {
15hunk ./src/allmydata/scripts/cli.py 55
16 class MakeDirectoryOptions(VDriveOptions):
17     def parseArgs(self, where=""):
18         self.where = argv_to_unicode(where)
19+
20+    def getSynopsis(self):
21+        return "Usage:  %s mkdir [options] [REMOTE_DIR]" % (self.command_name,)
22+
23     longdesc = """Create a new directory, either unlinked or as a subdirectory."""
24 
25 class AddAliasOptions(VDriveOptions):
26hunk ./src/allmydata/scripts/cli.py 69
27         self.cap = cap
28 
29     def getSynopsis(self):
30-        return "Usage:  %s add-alias ALIAS[:] DIRCAP" % (os.path.basename(sys.argv[0]),)
31+        return "Usage:  %s add-alias [options] ALIAS[:] DIRCAP" % (self.command_name,)
32 
33     longdesc = """Add a new alias for an existing directory."""
34 
35hunk ./src/allmydata/scripts/cli.py 80
36             self.alias = self.alias[:-1]
37 
38     def getSynopsis(self):
39-        return "Usage:  %s create-alias ALIAS[:]" % (os.path.basename(sys.argv[0]),)
40+        return "Usage:  %s create-alias [options] ALIAS[:]" % (self.command_name,)
41 
42     longdesc = """Create a new directory and add an alias for it."""
43 
44hunk ./src/allmydata/scripts/cli.py 84
45-class ListAliasOptions(VDriveOptions):
46+class ListAliasesOptions(VDriveOptions):
47+    def getSynopsis(self):
48+        return "Usage:  %s list-aliases [options]" % (self.command_name,)
49+
50     longdesc = """Display a table of all configured aliases."""
51 
52 class ListOptions(VDriveOptions):
53hunk ./src/allmydata/scripts/cli.py 145
54             self.to_file = None
55 
56     def getSynopsis(self):
57-        return "Usage:  %s get REMOTE_FILE LOCAL_FILE" % (os.path.basename(sys.argv[0]),)
58+        return "Usage:  %s get [options] REMOTE_FILE LOCAL_FILE" % (self.command_name,)
59 
60     longdesc = """
61     Retrieve a file from the grid and write it to the local filesystem. If
62hunk ./src/allmydata/scripts/cli.py 184
63             self.from_file = None
64 
65     def getSynopsis(self):
66-        return "Usage:  %s put LOCAL_FILE REMOTE_FILE" % (os.path.basename(sys.argv[0]),)
67+        return "Usage:  %s put [options] LOCAL_FILE REMOTE_FILE" % (self.command_name,)
68 
69     longdesc = """
70     Put a file into the grid, copying its contents from the local filesystem.
71hunk ./src/allmydata/scripts/cli.py 215
72          "When copying to local files, write out filecaps instead of actual "
73          "data (only useful for debugging and tree-comparison purposes)."),
74         ]
75+
76     def parseArgs(self, *args):
77         if len(args) < 2:
78             raise usage.UsageError("cp requires at least two arguments")
79hunk ./src/allmydata/scripts/cli.py 221
80         self.sources = map(argv_to_unicode, args[:-1])
81         self.destination = argv_to_unicode(args[-1])
82+
83     def getSynopsis(self):
84hunk ./src/allmydata/scripts/cli.py 223
85-        return "Usage: tahoe [options] cp FROM.. TO"
86+        return "Usage: tahoe cp [options] FROM.. TO"
87+
88     longdesc = """
89     Use 'tahoe cp' to copy files between a local filesystem and a Tahoe grid.
90     Any FROM/TO arguments that begin with an alias indicate Tahoe-side
91hunk ./src/allmydata/scripts/cli.py 255
92         self.where = argv_to_unicode(where)
93 
94     def getSynopsis(self):
95-        return "Usage:  %s rm REMOTE_FILE" % (os.path.basename(sys.argv[0]),)
96+        return "Usage:  %s rm [options] REMOTE_FILE" % (self.command_name,)
97 
98 class UnlinkOptions(RmOptions):
99     def getSynopsis(self):
100hunk ./src/allmydata/scripts/cli.py 259
101-        return "Usage:  %s unlink REMOTE_FILE" % (os.path.basename(sys.argv[0]),)
102+        return "Usage:  %s unlink [options] REMOTE_FILE" % (self.command_name,)
103 
104 class MvOptions(VDriveOptions):
105     def parseArgs(self, frompath, topath):
106hunk ./src/allmydata/scripts/cli.py 267
107         self.to_file = argv_to_unicode(topath)
108 
109     def getSynopsis(self):
110-        return "Usage:  %s mv FROM TO" % (os.path.basename(sys.argv[0]),)
111+        return "Usage:  %s mv [options] FROM TO" % (self.command_name,)
112+
113     longdesc = """
114     Use 'tahoe mv' to move files that are already on the grid elsewhere on
115     the grid, e.g., 'tahoe mv alias:some_file alias:new_file'.
116hunk ./src/allmydata/scripts/cli.py 287
117         self.to_file = argv_to_unicode(topath)
118 
119     def getSynopsis(self):
120-        return "Usage:  %s ln FROM_LINK TO_LINK" % (os.path.basename(sys.argv[0]),)
121+        return "Usage:  %s ln [options] FROM_LINK TO_LINK" % (self.command_name,)
122 
123     longdesc = """
124     Use 'tahoe ln' to duplicate a link (directory entry) already on the grid
125hunk ./src/allmydata/scripts/cli.py 333
126         self.from_dir = argv_to_unicode(localdir)
127         self.to_dir = argv_to_unicode(topath)
128 
129-    def getSynopsis(Self):
130-        return "Usage:  %s backup FROM ALIAS:TO" % os.path.basename(sys.argv[0])
131+    def getSynopsis(self):
132+        return "Usage:  %s backup [options] FROM ALIAS:TO" % (self.command_name,)
133 
134     def opt_exclude(self, pattern):
135         """Ignore files matching a glob pattern. You may give multiple
136hunk ./src/allmydata/scripts/cli.py 392
137         self.where = argv_to_unicode(where)
138 
139     def getSynopsis(self):
140-        return "Usage:  %s webopen [ALIAS:PATH]" % (os.path.basename(sys.argv[0]),)
141+        return "Usage:  %s webopen [options] [ALIAS:PATH]" % (self.command_name,)
142 
143     longdesc = """Open a web browser to the contents of some file or
144     directory on the grid. When run without arguments, open the Welcome
145hunk ./src/allmydata/scripts/cli.py 409
146         self.where = argv_to_unicode(where)
147 
148     def getSynopsis(self):
149-        return "Usage:  %s manifest [ALIAS:PATH]" % (os.path.basename(sys.argv[0]),)
150+        return "Usage:  %s manifest [options] [ALIAS:PATH]" % (self.command_name,)
151 
152     longdesc = """Print a list of all files and directories reachable from
153     the given starting point."""
154hunk ./src/allmydata/scripts/cli.py 422
155         self.where = argv_to_unicode(where)
156 
157     def getSynopsis(self):
158-        return "Usage:  %s stats [ALIAS:PATH]" % (os.path.basename(sys.argv[0]),)
159+        return "Usage:  %s stats [options] [ALIAS:PATH]" % (self.command_name,)
160 
161     longdesc = """Print statistics about of all files and directories
162     reachable from the given starting point."""
163hunk ./src/allmydata/scripts/cli.py 438
164         self.where = argv_to_unicode(where)
165 
166     def getSynopsis(self):
167-        return "Usage:  %s check [ALIAS:PATH]" % (os.path.basename(sys.argv[0]),)
168+        return "Usage:  %s check [options] [ALIAS:PATH]" % (self.command_name,)
169 
170     longdesc = """
171     Check a single file or directory: count how many shares are available and
172hunk ./src/allmydata/scripts/cli.py 457
173         self.where = argv_to_unicode(where)
174 
175     def getSynopsis(self):
176-        return "Usage:  %s deep-check [ALIAS:PATH]" % (os.path.basename(sys.argv[0]),)
177+        return "Usage:  %s deep-check [options] [ALIAS:PATH]" % (self.command_name,)
178 
179     longdesc = """
180     Check all files and directories reachable from the given starting point
181hunk ./src/allmydata/scripts/cli.py 468
182     ["mkdir", None, MakeDirectoryOptions, "Create a new directory."],
183     ["add-alias", None, AddAliasOptions, "Add a new alias cap."],
184     ["create-alias", None, CreateAliasOptions, "Create a new alias cap."],
185-    ["list-aliases", None, ListAliasOptions, "List all alias caps."],
186+    ["list-aliases", None, ListAliasesOptions, "List all alias caps."],
187     ["ls", None, ListOptions, "List a directory."],
188     ["get", None, GetOptions, "Retrieve a file from the grid."],
189     ["put", None, PutOptions, "Upload a file into the grid."],
190hunk ./src/allmydata/scripts/common.py 43
191             _default_nodedir and (" [default for most commands: " + quote_output(_default_nodedir) + "]") or "")],
192     ]
193 
194+    def __init__(self):
195+        super(BaseOptions, self).__init__()
196+        self.command_name = os.path.basename(sys.argv[0])
197+        if self.command_name == 'trial':
198+            self.command_name = 'tahoe'
199+
200     def opt_version(self):
201         import allmydata
202         print >>self.stdout, allmydata.get_package_versions_string(debug=True)
203hunk ./src/allmydata/scripts/create_node.py 20
204         ]
205 
206     def getSynopsis(self):
207-        return "Usage:  %s create-client [options] [NODEDIR]" % (os.path.basename(sys.argv[0]),)
208+        return "Usage:  %s create-client [options] [NODEDIR]" % (self.command_name,)
209 
210 
211 class CreateNodeOptions(CreateClientOptions):
212hunk ./src/allmydata/scripts/create_node.py 29
213         ]
214 
215     def getSynopsis(self):
216-        return "Usage:  %s create-node [options] [NODEDIR]" % (os.path.basename(sys.argv[0]),)
217+        return "Usage:  %s create-node [options] [NODEDIR]" % (self.command_name,)
218 
219 
220 class CreateIntroducerOptions(BasedirMixin, BaseOptions):
221hunk ./src/allmydata/scripts/create_node.py 40
222     ]
223 
224     def getSynopsis(self):
225-        return "Usage:  %s create-introducer [options] NODEDIR" % (os.path.basename(sys.argv[0]),)
226+        return "Usage:  %s create-introducer [options] NODEDIR" % (self.command_name,)
227 
228 
229 client_tac = """
230hunk ./src/allmydata/scripts/startstop_node.py 16
231         ]
232 
233     def getSynopsis(self):
234-        return "Usage:  %s start [options] [NODEDIR]" % (os.path.basename(sys.argv[0]),)
235+        return "Usage:  %s start [options] [NODEDIR]" % (self.command_name,)
236 
237 
238 class StopOptions(BasedirMixin, BaseOptions):
239hunk ./src/allmydata/scripts/startstop_node.py 21
240     def getSynopsis(self):
241-        return "Usage:  %s stop [options] [NODEDIR]" % (os.path.basename(sys.argv[0]),)
242+        return "Usage:  %s stop [options] [NODEDIR]" % (self.command_name,)
243 
244 
245 class RestartOptions(BasedirMixin, BaseOptions):
246hunk ./src/allmydata/scripts/startstop_node.py 31
247         ]
248 
249     def getSynopsis(self):
250-        return "Usage:  %s restart [options] [NODEDIR]" % (os.path.basename(sys.argv[0]),)
251+        return "Usage:  %s restart [options] [NODEDIR]" % (self.command_name,)
252 
253 
254 class RunOptions(BasedirMixin, BaseOptions):
255hunk ./src/allmydata/scripts/startstop_node.py 42
256     ]
257 
258     def getSynopsis(self):
259-        return "Usage:  %s run [options] [NODEDIR]" % (os.path.basename(sys.argv[0]),)
260+        return "Usage:  %s run [options] [NODEDIR]" % (self.command_name,)
261 
262 
263 def start(opts, out=sys.stdout, err=sys.stderr):
264hunk ./src/allmydata/test/test_cli.py 450
265 
266 
267 class Help(unittest.TestCase):
268-
269     def test_get(self):
270         help = str(cli.GetOptions())
271hunk ./src/allmydata/test/test_cli.py 452
272-        self.failUnless("get REMOTE_FILE LOCAL_FILE" in help, help)
273-        self.failUnless("% tahoe get FOO |less" in help, help)
274+        self.failUnlessIn(" get [options] REMOTE_FILE LOCAL_FILE", help)
275+        self.failUnlessIn("% tahoe get FOO |less", help)
276 
277     def test_put(self):
278         help = str(cli.PutOptions())
279hunk ./src/allmydata/test/test_cli.py 457
280-        self.failUnless("put LOCAL_FILE REMOTE_FILE" in help, help)
281-        self.failUnless("% cat FILE | tahoe put" in help, help)
282+        self.failUnlessIn(" put [options] LOCAL_FILE REMOTE_FILE", help)
283+        self.failUnlessIn("% cat FILE | tahoe put", help)
284+
285+    def test_unlink(self):
286+        help = str(cli.UnlinkOptions())
287+        self.failUnlessIn(" unlink [options] REMOTE_FILE", help)
288 
289     def test_rm(self):
290         help = str(cli.RmOptions())
291hunk ./src/allmydata/test/test_cli.py 466
292-        self.failUnless("rm REMOTE_FILE" in help, help)
293+        self.failUnlessIn(" rm [options] REMOTE_FILE", help)
294 
295     def test_mv(self):
296         help = str(cli.MvOptions())
297hunk ./src/allmydata/test/test_cli.py 470
298-        self.failUnless("mv FROM TO" in help, help)
299-        self.failUnless("Use 'tahoe mv' to move files" in help)
300+        self.failUnlessIn(" mv [options] FROM TO", help)
301+        self.failUnlessIn("Use 'tahoe mv' to move files", help)
302+
303+    def test_cp(self):
304+        help = str(cli.CpOptions())
305+        self.failUnlessIn(" cp [options] FROM.. TO", help)
306+        self.failUnlessIn("Use 'tahoe cp' to copy files", help)
307 
308     def test_ln(self):
309         help = str(cli.LnOptions())
310hunk ./src/allmydata/test/test_cli.py 480
311-        self.failUnless("ln FROM_LINK TO_LINK" in help, help)
312-        self.failUnless("Use 'tahoe ln' to duplicate a link" in help)
313+        self.failUnlessIn(" ln [options] FROM_LINK TO_LINK", help)
314+        self.failUnlessIn("Use 'tahoe ln' to duplicate a link", help)
315+
316+    def test_mkdir(self):
317+        help = str(cli.MakeDirectoryOptions())
318+        self.failUnlessIn(" mkdir [options] [REMOTE_DIR]", help)
319+        self.failUnlessIn("Create a new directory", help)
320 
321     def test_backup(self):
322         help = str(cli.BackupOptions())
323hunk ./src/allmydata/test/test_cli.py 490
324-        self.failUnless("backup FROM ALIAS:TO" in help, help)
325+        self.failUnlessIn(" backup [options] FROM ALIAS:TO", help)
326 
327     def test_webopen(self):
328         help = str(cli.WebopenOptions())
329hunk ./src/allmydata/test/test_cli.py 494
330-        self.failUnless("webopen [ALIAS:PATH]" in help, help)
331+        self.failUnlessIn(" webopen [options] [ALIAS:PATH]", help)
332 
333     def test_manifest(self):
334         help = str(cli.ManifestOptions())
335hunk ./src/allmydata/test/test_cli.py 498
336-        self.failUnless("manifest [ALIAS:PATH]" in help, help)
337+        self.failUnlessIn(" manifest [options] [ALIAS:PATH]", help)
338 
339     def test_stats(self):
340         help = str(cli.StatsOptions())
341hunk ./src/allmydata/test/test_cli.py 502
342-        self.failUnless("stats [ALIAS:PATH]" in help, help)
343+        self.failUnlessIn(" stats [options] [ALIAS:PATH]", help)
344 
345     def test_check(self):
346         help = str(cli.CheckOptions())
347hunk ./src/allmydata/test/test_cli.py 506
348-        self.failUnless("check [ALIAS:PATH]" in help, help)
349+        self.failUnlessIn(" check [options] [ALIAS:PATH]", help)
350 
351     def test_deep_check(self):
352         help = str(cli.DeepCheckOptions())
353hunk ./src/allmydata/test/test_cli.py 510
354-        self.failUnless("deep-check [ALIAS:PATH]" in help, help)
355+        self.failUnlessIn(" deep-check [options] [ALIAS:PATH]", help)
356 
357     def test_create_alias(self):
358         help = str(cli.CreateAliasOptions())
359hunk ./src/allmydata/test/test_cli.py 514
360-        self.failUnless("create-alias ALIAS[:]" in help, help)
361+        self.failUnlessIn(" create-alias [options] ALIAS[:]", help)
362 
363hunk ./src/allmydata/test/test_cli.py 516
364-    def test_add_aliases(self):
365+    def test_add_alias(self):
366         help = str(cli.AddAliasOptions())
367hunk ./src/allmydata/test/test_cli.py 518
368-        self.failUnless("add-alias ALIAS[:] DIRCAP" in help, help)
369+        self.failUnlessIn(" add-alias [options] ALIAS[:] DIRCAP", help)
370+
371+    def test_list_aliases(self):
372+        help = str(cli.ListAliasesOptions())
373+        self.failUnlessIn(" list-aliases [options]", help)
374+
375+    def test_start(self):
376+        help = str(startstop_node.StartOptions())
377+        self.failUnlessIn(" start [options] [NODEDIR]", help)
378+
379+    def test_stop(self):
380+        help = str(startstop_node.StopOptions())
381+        self.failUnlessIn(" stop [options] [NODEDIR]", help)
382+
383+    def test_restart(self):
384+        help = str(startstop_node.RestartOptions())
385+        self.failUnlessIn(" restart [options] [NODEDIR]", help)
386+
387+    def test_run(self):
388+        help = str(startstop_node.RunOptions())
389+        self.failUnlessIn(" run [options] [NODEDIR]", help)
390+
391+    def test_create_client(self):
392+        help = str(create_node.CreateClientOptions())
393+        self.failUnlessIn(" create-client [options] [NODEDIR]", help)
394+
395+    def test_create_node(self):
396+        help = str(create_node.CreateNodeOptions())
397+        self.failUnlessIn(" create-node [options] [NODEDIR]", help)
398+
399+    def test_create_introducer(self):
400+        help = str(create_node.CreateIntroducerOptions())
401+        self.failUnlessIn(" create-introducer [options] NODEDIR", help)
402 
403     def test_debug_trial(self):
404         help = str(debug.TrialOptions())
405hunk ./src/allmydata/test/test_cli.py 554
406-        self.failUnless("debug trial [options] [[file|package|module|TestCase|testmethod]...]" in help, help)
407-        self.failUnless("The 'tahoe debug trial' command uses the correct imports" in help, help)
408+        self.failUnlessIn(" debug trial [options] [[file|package|module|TestCase|testmethod]...]", help)
409+        self.failUnlessIn("The 'tahoe debug trial' command uses the correct imports", help)
410 
411 
412 class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase):
413}
414[cleanup: implement rm as a synonym for unlink rather than vice-versa. refs #776
415david-sarah@jacaranda.org**20110724231338
416 Ignore-this: 2ade7d0bdd4285bc05ccb4af305517fe
417] {
418move ./src/allmydata/scripts/tahoe_rm.py ./src/allmydata/scripts/tahoe_unlink.py
419hunk ./src/allmydata/scripts/cli.py 250
420     slashes.
421     """
422 
423-class RmOptions(VDriveOptions):
424+class UnlinkOptions(VDriveOptions):
425     def parseArgs(self, where):
426         self.where = argv_to_unicode(where)
427 
428hunk ./src/allmydata/scripts/cli.py 255
429     def getSynopsis(self):
430-        return "Usage:  %s rm [options] REMOTE_FILE" % (self.command_name,)
431+        return "Usage:  %s unlink [options] REMOTE_FILE" % (self.command_name,)
432 
433hunk ./src/allmydata/scripts/cli.py 257
434-class UnlinkOptions(RmOptions):
435+class RmOptions(UnlinkOptions):
436     def getSynopsis(self):
437hunk ./src/allmydata/scripts/cli.py 259
438-        return "Usage:  %s unlink [options] REMOTE_FILE" % (self.command_name,)
439+        return "Usage:  %s rm [options] REMOTE_FILE" % (self.command_name,)
440 
441 class MvOptions(VDriveOptions):
442     def parseArgs(self, frompath, topath):
443hunk ./src/allmydata/scripts/cli.py 473
444     ["get", None, GetOptions, "Retrieve a file from the grid."],
445     ["put", None, PutOptions, "Upload a file into the grid."],
446     ["cp", None, CpOptions, "Copy one or more files or directories."],
447-    ["rm", None, RmOptions, "Unlink a file or directory on the grid."],
448-    ["unlink", None, UnlinkOptions, "Unlink a file or directory on the grid (same as rm)."],
449+    ["unlink", None, UnlinkOptions, "Unlink a file or directory on the grid."],
450+    ["rm", None, RmOptions, "Unlink a file or directory on the grid (same as unlink)."],
451     ["mv", None, MvOptions, "Move a file within the grid."],
452     ["ln", None, LnOptions, "Make an additional link to an existing file or directory."],
453     ["backup", None, BackupOptions, "Make target dir look like local dir."],
454hunk ./src/allmydata/scripts/cli.py 534
455     rc = tahoe_cp.copy(options)
456     return rc
457 
458-def rm(options):
459-    from allmydata.scripts import tahoe_rm
460-    rc = tahoe_rm.rm(options)
461+def unlink(options):
462+    from allmydata.scripts import tahoe_unlink
463+    rc = tahoe_unlink.unlink(options)
464     return rc
465 
466 def mv(options):
467hunk ./src/allmydata/scripts/cli.py 588
468     "get": get,
469     "put": put,
470     "cp": cp,
471-    "rm": rm,
472-    "unlink": rm,
473+    "unlink": unlink,
474+    "rm": unlink,
475     "mv": mv,
476     "ln": ln,
477     "backup": backup,
478hunk ./src/allmydata/scripts/tahoe_unlink.py 7
479 from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, escape_path, \
480                                      UnknownAliasError
481 
482-def rm(options):
483+def unlink(options):
484     """
485     @return: a Deferred which eventually fires with the exit code
486     """
487hunk ./src/allmydata/test/test_cli.py 2593
488         return d
489 
490 
491-class Rm(GridTestMixin, CLITestMixin, unittest.TestCase):
492-    def test_rm_without_alias(self):
493-        # 'tahoe rm' should behave sensibly when invoked without an explicit
494+class Unlink(GridTestMixin, CLITestMixin, unittest.TestCase):
495+    def test_unlink_without_alias(self):
496+        # 'tahoe unlink' should behave sensibly when invoked without an explicit
497         # alias before the default 'tahoe' alias has been created.
498hunk ./src/allmydata/test/test_cli.py 2597
499-        self.basedir = "cli/Rm/rm_without_alias"
500+        self.basedir = "cli/Unlink/unlink_without_alias"
501         self.set_up_grid()
502hunk ./src/allmydata/test/test_cli.py 2599
503-        d = self.do_cli("rm", "afile")
504+        d = self.do_cli("unlink", "afile")
505         def _check((rc, out, err)):
506             self.failUnlessReallyEqual(rc, 1)
507             self.failUnlessIn("error:", err)
508hunk ./src/allmydata/test/test_cli.py 2610
509         d.addCallback(_check)
510         return d
511 
512-    def test_rm_with_nonexistent_alias(self):
513-        # 'tahoe rm' should behave sensibly when invoked with an explicit
514+    def test_unlink_with_nonexistent_alias(self):
515+        # 'tahoe unlink' should behave sensibly when invoked with an explicit
516         # alias that doesn't exist.
517hunk ./src/allmydata/test/test_cli.py 2613
518-        self.basedir = "cli/Rm/rm_with_nonexistent_alias"
519+        self.basedir = "cli/Unlink/unlink_with_nonexistent_alias"
520         self.set_up_grid()
521hunk ./src/allmydata/test/test_cli.py 2615
522-        d = self.do_cli("rm", "nonexistent:afile")
523+        d = self.do_cli("unlink", "nonexistent:afile")
524         def _check((rc, out, err)):
525             self.failUnlessReallyEqual(rc, 1)
526             self.failUnlessIn("error:", err)
527}
528
529Context:
530
531[misc/build_helpers/run_trial.py: undo change to block pywin32 (it didn't work because run_trial.py is no longer used). refs #1334
532david-sarah@jacaranda.org**20110722035402
533 Ignore-this: 5d03f544c4154f088e26c7107494bf39
534]
535[misc/build_helpers/run_trial.py: ensure that pywin32 is not on the sys.path when running the test suite. Includes some temporary debugging printouts that will be removed. refs #1334
536david-sarah@jacaranda.org**20110722024907
537 Ignore-this: 5141a9f83a4085ed4ca21f0bbb20bb9c
538]
539[frontends/ftpd.py: remove the check for IWriteFile.close since we're now guaranteed to be using Twisted >= 10.1 which has it.
540david-sarah@jacaranda.org**20110722000320
541 Ignore-this: 55cd558b791526113db3f83c00ec328a
542]
543[Update the dependency on zope.interface to fix an incompatiblity between Nevow and zope.interface 3.6.4. fixes #1435
544david-sarah@jacaranda.org**20110721234941
545 Ignore-this: 2ff3fcfc030fca1a4d4c7f1fed0f2aa9
546]
547[Update the dependency on Twisted to >= 10.1. This allows us to simplify some documentation: it's no longer necessary to install pywin32 on Windows, or apply a patch to Twisted in order to use the FTP frontend. fixes #1274, #1438. refs #1429
548david-sarah@jacaranda.org**20110721233658
549 Ignore-this: 81b41745477163c9b39c0b59db91cc62
550]
551[docs/running.rst: use 'tahoe run ~/.tahoe' instead of 'tahoe run' (the default is the current directory, unlike 'tahoe start').
552david-sarah@jacaranda.org**20110718005949
553 Ignore-this: 81837fbce073e93d88a3e7ae3122458c
554]
555[docs/running.rst: say to put the introducer.furl in tahoe.cfg.
556david-sarah@jacaranda.org**20110717194315
557 Ignore-this: 954cc4c08e413e8c62685d58ff3e11f3
558]
559[setup: remove the dependency on foolscap's "secure_connections" extra, add a dependency on pyOpenSSL
560zooko@zooko.com**20110717114226
561 Ignore-this: df222120d41447ce4102616921626c82
562 fixes #1383
563]
564[docs: add missing link in NEWS.rst
565zooko@zooko.com**20110712153307
566 Ignore-this: be7b7eb81c03700b739daa1027d72b35
567]
568[contrib: remove the contributed fuse modules and the entire contrib/ directory, which is now empty
569zooko@zooko.com**20110712153229
570 Ignore-this: 723c4f9e2211027c79d711715d972c5
571 Also remove a couple of vestigial references to figleaf, which is long gone.
572 fixes #1409 (remove contrib/fuse)
573]
574[README.txt: say that quickstart.rst is in the docs directory.
575david-sarah@jacaranda.org**20110717192400
576 Ignore-this: bc6d35a85c496b77dbef7570677ea42a
577]
578[test_sftp.py cleanup: remove a redundant definition of failUnlessReallyEqual.
579david-sarah@jacaranda.org**20110716181813
580 Ignore-this: 50113380b368c573f07ac6fe2eb1e97f
581]
582[add Protovis.js-based download-status timeline visualization
583Brian Warner <warner@lothar.com>**20110629222606
584 Ignore-this: 477ccef5c51b30e246f5b6e04ab4a127
585 
586 provide status overlap info on the webapi t=json output, add decode/decrypt
587 rate tooltips, add zoomin/zoomout buttons
588]
589[add more download-status data, fix tests
590Brian Warner <warner@lothar.com>**20110629222555
591 Ignore-this: e9e0b7e0163f1e95858aa646b9b17b8c
592]
593[prepare for viz: improve DownloadStatus events
594Brian Warner <warner@lothar.com>**20110629222542
595 Ignore-this: 16d0bde6b734bb501aa6f1174b2b57be
596 
597 consolidate IDownloadStatusHandlingConsumer stuff into DownloadNode
598]
599[docs: fix error in crypto specification that was noticed by Taylor R Campbell <campbell+tahoe@mumble.net>
600zooko@zooko.com**20110629185711
601 Ignore-this: b921ed60c1c8ba3c390737fbcbe47a67
602]
603[setup.py: don't make bin/tahoe.pyscript executable. fixes #1347
604david-sarah@jacaranda.org**20110130235809
605 Ignore-this: 3454c8b5d9c2c77ace03de3ef2d9398a
606]
607[Makefile: remove targets relating to 'setup.py check_auto_deps' which no longer exists. fixes #1345
608david-sarah@jacaranda.org**20110626054124
609 Ignore-this: abb864427a1b91bd10d5132b4589fd90
610]
611[Makefile: add 'make check' as an alias for 'make test'. Also remove an unnecessary dependency of 'test' on 'build' and 'src/allmydata/_version.py'. fixes #1344
612david-sarah@jacaranda.org**20110623205528
613 Ignore-this: c63e23146c39195de52fb17c7c49b2da
614]
615[Rename test_package_initialization.py to (much shorter) test_import.py .
616Brian Warner <warner@lothar.com>**20110611190234
617 Ignore-this: 3eb3dbac73600eeff5cfa6b65d65822
618 
619 The former name was making my 'ls' listings hard to read, by forcing them
620 down to just two columns.
621]
622[tests: fix tests to accomodate [20110611153758-92b7f-0ba5e4726fb6318dac28fb762a6512a003f4c430]
623zooko@zooko.com**20110611163741
624 Ignore-this: 64073a5f39e7937e8e5e1314c1a302d1
625 Apparently none of the two authors (stercor, terrell), three reviewers (warner, davidsarah, terrell), or one committer (me) actually ran the tests. This is presumably due to #20.
626 fixes #1412
627]
628[wui: right-align the size column in the WUI
629zooko@zooko.com**20110611153758
630 Ignore-this: 492bdaf4373c96f59f90581c7daf7cd7
631 Thanks to Ted "stercor" Rolle Jr. and Terrell Russell.
632 fixes #1412
633]
634[docs: three minor fixes
635zooko@zooko.com**20110610121656
636 Ignore-this: fec96579eb95aceb2ad5fc01a814c8a2
637 CREDITS for arc for stats tweak
638 fix link to .zip file in quickstart.rst (thanks to ChosenOne for noticing)
639 English usage tweak
640]
641[docs/running.rst: fix stray HTML (not .rst) link noticed by ChosenOne.
642david-sarah@jacaranda.org**20110609223719
643 Ignore-this: fc50ac9c94792dcac6f1067df8ac0d4a
644]
645[server.py:  get_latencies now reports percentiles _only_ if there are sufficient observations for the interpretation of the percentile to be unambiguous.
646wilcoxjg@gmail.com**20110527120135
647 Ignore-this: 2e7029764bffc60e26f471d7c2b6611e
648 interfaces.py:  modified the return type of RIStatsProvider.get_stats to allow for None as a return value
649 NEWS.rst, stats.py: documentation of change to get_latencies
650 stats.rst: now documents percentile modification in get_latencies
651 test_storage.py:  test_latencies now expects None in output categories that contain too few samples for the associated percentile to be unambiguously reported.
652 fixes #1392
653]
654[docs: revert link in relnotes.txt from NEWS.rst to NEWS, since the former did not exist at revision 5000.
655david-sarah@jacaranda.org**20110517011214
656 Ignore-this: 6a5be6e70241e3ec0575641f64343df7
657]
658[docs: convert NEWS to NEWS.rst and change all references to it.
659david-sarah@jacaranda.org**20110517010255
660 Ignore-this: a820b93ea10577c77e9c8206dbfe770d
661]
662[docs: remove out-of-date docs/testgrid/introducer.furl and containing directory. fixes #1404
663david-sarah@jacaranda.org**20110512140559
664 Ignore-this: 784548fc5367fac5450df1c46890876d
665]
666[scripts/common.py: don't assume that the default alias is always 'tahoe' (it is, but the API of get_alias doesn't say so). refs #1342
667david-sarah@jacaranda.org**20110130164923
668 Ignore-this: a271e77ce81d84bb4c43645b891d92eb
669]
670[setup: don't catch all Exception from check_requirement(), but only PackagingError and ImportError
671zooko@zooko.com**20110128142006
672 Ignore-this: 57d4bc9298b711e4bc9dc832c75295de
673 I noticed this because I had accidentally inserted a bug which caused AssertionError to be raised from check_requirement().
674]
675[M-x whitespace-cleanup
676zooko@zooko.com**20110510193653
677 Ignore-this: dea02f831298c0f65ad096960e7df5c7
678]
679[docs: fix typo in running.rst, thanks to arch_o_median
680zooko@zooko.com**20110510193633
681 Ignore-this: ca06de166a46abbc61140513918e79e8
682]
683[relnotes.txt: don't claim to work on Cygwin (which has been untested for some time). refs #1342
684david-sarah@jacaranda.org**20110204204902
685 Ignore-this: 85ef118a48453d93fa4cddc32d65b25b
686]
687[relnotes.txt: forseeable -> foreseeable. refs #1342
688david-sarah@jacaranda.org**20110204204116
689 Ignore-this: 746debc4d82f4031ebf75ab4031b3a9
690]
691[replace remaining .html docs with .rst docs
692zooko@zooko.com**20110510191650
693 Ignore-this: d557d960a986d4ac8216d1677d236399
694 Remove install.html (long since deprecated).
695 Also replace some obsolete references to install.html with references to quickstart.rst.
696 Fix some broken internal references within docs/historical/historical_known_issues.txt.
697 Thanks to Ravi Pinjala and Patrick McDonald.
698 refs #1227
699]
700[docs: FTP-and-SFTP.rst: fix a minor error and update the information about which version of Twisted fixes #1297
701zooko@zooko.com**20110428055232
702 Ignore-this: b63cfb4ebdbe32fb3b5f885255db4d39
703]
704[munin tahoe_files plugin: fix incorrect file count
705francois@ctrlaltdel.ch**20110428055312
706 Ignore-this: 334ba49a0bbd93b4a7b06a25697aba34
707 fixes #1391
708]
709[corrected "k must never be smaller than N" to "k must never be greater than N"
710secorp@allmydata.org**20110425010308
711 Ignore-this: 233129505d6c70860087f22541805eac
712]
713[Fix a test failure in test_package_initialization on Python 2.4.x due to exceptions being stringified differently than in later versions of Python. refs #1389
714david-sarah@jacaranda.org**20110411190738
715 Ignore-this: 7847d26bc117c328c679f08a7baee519
716]
717[tests: add test for including the ImportError message and traceback entry in the summary of errors from importing dependencies. refs #1389
718david-sarah@jacaranda.org**20110410155844
719 Ignore-this: fbecdbeb0d06a0f875fe8d4030aabafa
720]
721[allmydata/__init__.py: preserve the message and last traceback entry (file, line number, function, and source line) of ImportErrors in the package versions string. fixes #1389
722david-sarah@jacaranda.org**20110410155705
723 Ignore-this: 2f87b8b327906cf8bfca9440a0904900
724]
725[remove unused variable detected by pyflakes
726zooko@zooko.com**20110407172231
727 Ignore-this: 7344652d5e0720af822070d91f03daf9
728]
729[allmydata/__init__.py: Nicer reporting of unparseable version numbers in dependencies. fixes #1388
730david-sarah@jacaranda.org**20110401202750
731 Ignore-this: 9c6bd599259d2405e1caadbb3e0d8c7f
732]
733[update FTP-and-SFTP.rst: the necessary patch is included in Twisted-10.1
734Brian Warner <warner@lothar.com>**20110325232511
735 Ignore-this: d5307faa6900f143193bfbe14e0f01a
736]
737[control.py: remove all uses of s.get_serverid()
738warner@lothar.com**20110227011203
739 Ignore-this: f80a787953bd7fa3d40e828bde00e855
740]
741[web: remove some uses of s.get_serverid(), not all
742warner@lothar.com**20110227011159
743 Ignore-this: a9347d9cf6436537a47edc6efde9f8be
744]
745[immutable/downloader/fetcher.py: remove all get_serverid() calls
746warner@lothar.com**20110227011156
747 Ignore-this: fb5ef018ade1749348b546ec24f7f09a
748]
749[immutable/downloader/fetcher.py: fix diversity bug in server-response handling
750warner@lothar.com**20110227011153
751 Ignore-this: bcd62232c9159371ae8a16ff63d22c1b
752 
753 When blocks terminate (either COMPLETE or CORRUPT/DEAD/BADSEGNUM), the
754 _shares_from_server dict was being popped incorrectly (using shnum as the
755 index instead of serverid). I'm still thinking through the consequences of
756 this bug. It was probably benign and really hard to detect. I think it would
757 cause us to incorrectly believe that we're pulling too many shares from a
758 server, and thus prefer a different server rather than asking for a second
759 share from the first server. The diversity code is intended to spread out the
760 number of shares simultaneously being requested from each server, but with
761 this bug, it might be spreading out the total number of shares requested at
762 all, not just simultaneously. (note that SegmentFetcher is scoped to a single
763 segment, so the effect doesn't last very long).
764]
765[immutable/downloader/share.py: reduce get_serverid(), one left, update ext deps
766warner@lothar.com**20110227011150
767 Ignore-this: d8d56dd8e7b280792b40105e13664554
768 
769 test_download.py: create+check MyShare instances better, make sure they share
770 Server objects, now that finder.py cares
771]
772[immutable/downloader/finder.py: reduce use of get_serverid(), one left
773warner@lothar.com**20110227011146
774 Ignore-this: 5785be173b491ae8a78faf5142892020
775]
776[immutable/offloaded.py: reduce use of get_serverid() a bit more
777warner@lothar.com**20110227011142
778 Ignore-this: b48acc1b2ae1b311da7f3ba4ffba38f
779]
780[immutable/upload.py: reduce use of get_serverid()
781warner@lothar.com**20110227011138
782 Ignore-this: ffdd7ff32bca890782119a6e9f1495f6
783]
784[immutable/checker.py: remove some uses of s.get_serverid(), not all
785warner@lothar.com**20110227011134
786 Ignore-this: e480a37efa9e94e8016d826c492f626e
787]
788[add remaining get_* methods to storage_client.Server, NoNetworkServer, and
789warner@lothar.com**20110227011132
790 Ignore-this: 6078279ddf42b179996a4b53bee8c421
791 MockIServer stubs
792]
793[upload.py: rearrange _make_trackers a bit, no behavior changes
794warner@lothar.com**20110227011128
795 Ignore-this: 296d4819e2af452b107177aef6ebb40f
796]
797[happinessutil.py: finally rename merge_peers to merge_servers
798warner@lothar.com**20110227011124
799 Ignore-this: c8cd381fea1dd888899cb71e4f86de6e
800]
801[test_upload.py: factor out FakeServerTracker
802warner@lothar.com**20110227011120
803 Ignore-this: 6c182cba90e908221099472cc159325b
804]
805[test_upload.py: server-vs-tracker cleanup
806warner@lothar.com**20110227011115
807 Ignore-this: 2915133be1a3ba456e8603885437e03
808]
809[happinessutil.py: server-vs-tracker cleanup
810warner@lothar.com**20110227011111
811 Ignore-this: b856c84033562d7d718cae7cb01085a9
812]
813[upload.py: more tracker-vs-server cleanup
814warner@lothar.com**20110227011107
815 Ignore-this: bb75ed2afef55e47c085b35def2de315
816]
817[upload.py: fix var names to avoid confusion between 'trackers' and 'servers'
818warner@lothar.com**20110227011103
819 Ignore-this: 5d5e3415b7d2732d92f42413c25d205d
820]
821[refactor: s/peer/server/ in immutable/upload, happinessutil.py, test_upload
822warner@lothar.com**20110227011100
823 Ignore-this: 7ea858755cbe5896ac212a925840fe68
824 
825 No behavioral changes, just updating variable/method names and log messages.
826 The effects outside these three files should be minimal: some exception
827 messages changed (to say "server" instead of "peer"), and some internal class
828 names were changed. A few things still use "peer" to minimize external
829 changes, like UploadResults.timings["peer_selection"] and
830 happinessutil.merge_peers, which can be changed later.
831]
832[storage_client.py: clean up test_add_server/test_add_descriptor, remove .test_servers
833warner@lothar.com**20110227011056
834 Ignore-this: efad933e78179d3d5fdcd6d1ef2b19cc
835]
836[test_client.py, upload.py:: remove KiB/MiB/etc constants, and other dead code
837warner@lothar.com**20110227011051
838 Ignore-this: dc83c5794c2afc4f81e592f689c0dc2d
839]
840[test: increase timeout on a network test because Francois's ARM machine hit that timeout
841zooko@zooko.com**20110317165909
842 Ignore-this: 380c345cdcbd196268ca5b65664ac85b
843 I'm skeptical that the test was proceeding correctly but ran out of time. It seems more likely that it had gotten hung. But if we raise the timeout to an even more extravagant number then we can be even more certain that the test was never going to finish.
844]
845[docs/configuration.rst: add a "Frontend Configuration" section
846Brian Warner <warner@lothar.com>**20110222014323
847 Ignore-this: 657018aa501fe4f0efef9851628444ca
848 
849 this points to docs/frontends/*.rst, which were previously underlinked
850]
851[web/filenode.py: avoid calling req.finish() on closed HTTP connections. Closes #1366
852"Brian Warner <warner@lothar.com>"**20110221061544
853 Ignore-this: 799d4de19933f2309b3c0c19a63bb888
854]
855[Add unit tests for cross_check_pkg_resources_versus_import, and a regression test for ref #1355. This requires a little refactoring to make it testable.
856david-sarah@jacaranda.org**20110221015817
857 Ignore-this: 51d181698f8c20d3aca58b057e9c475a
858]
859[allmydata/__init__.py: .name was used in place of the correct .__name__ when printing an exception. Also, robustify string formatting by using %r instead of %s in some places. fixes #1355.
860david-sarah@jacaranda.org**20110221020125
861 Ignore-this: b0744ed58f161bf188e037bad077fc48
862]
863[Refactor StorageFarmBroker handling of servers
864Brian Warner <warner@lothar.com>**20110221015804
865 Ignore-this: 842144ed92f5717699b8f580eab32a51
866 
867 Pass around IServer instance instead of (peerid, rref) tuple. Replace
868 "descriptor" with "server". Other replacements:
869 
870  get_all_servers -> get_connected_servers/get_known_servers
871  get_servers_for_index -> get_servers_for_psi (now returns IServers)
872 
873 This change still needs to be pushed further down: lots of code is now
874 getting the IServer and then distributing (peerid, rref) internally.
875 Instead, it ought to distribute the IServer internally and delay
876 extracting a serverid or rref until the last moment.
877 
878 no_network.py was updated to retain parallelism.
879]
880[TAG allmydata-tahoe-1.8.2
881warner@lothar.com**20110131020101]
882Patch bundle hash:
883d63eb46e0f919674d58e187b33af2beda2839b24