CLI: add 'tahoe unlink' as an alias to 'tahoe rm', for forward-compatibility.

This commit is contained in:
david-sarah 2010-07-17 15:04:11 -07:00
parent 6e8477114e
commit 8090785716
4 changed files with 11 additions and 1 deletions
CREDITSNEWS
src/allmydata

View File

@ -99,7 +99,7 @@ D: edited docs/running.html
N: David-Sarah Hopwood
E: david-sarah@jacaranda.org
P: 12F8 A95C C90B B68E 369C 003D 5947 3C63 3CB3 A807
D: Tahoe-LAFS Hacker; ticket gardening, code, code review, docs, SFTP frontend
D: Tahoe-LAFS Hacker; ticket gardening, code, code review, docs, SFTP, cli
N: Jacob Appelbaum
E: jacob@appelbaum.com

2
NEWS
View File

@ -9,6 +9,8 @@
- Fix minor layout issue in the Web User Interface with Internet Explorer
(#1097)
- Fix bug where server version number was always 0 on the welcome page (#1067)
- Add new command-line command "tahoe unlink" as a synonym for "tahoe rm"
(#1072)
* Release 1.7.0 (2010-06-18)

View File

@ -429,6 +429,7 @@ subCommands = [
["put", None, PutOptions, "Upload a file into the grid."],
["cp", None, CpOptions, "Copy one or more files."],
["rm", None, RmOptions, "Unlink a file or directory on the grid."],
["unlink", None, RmOptions, "Unlink a file or directory on the grid (same as rm)."],
["mv", None, MvOptions, "Move a file within the grid."],
["ln", None, LnOptions, "Make an additional link to an existing file."],
["backup", None, BackupOptions, "Make target dir look like local dir."],
@ -543,6 +544,7 @@ dispatch = {
"put": put,
"cp": cp,
"rm": rm,
"unlink": rm,
"mv": mv,
"ln": ln,
"backup": backup,

View File

@ -2435,6 +2435,9 @@ class Rm(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_rm_without_alias(self):
# 'tahoe rm' should behave sensibly when invoked without an explicit
# alias before the default 'tahoe' alias has been created.
d.addCallback(lambda ign: self.do_cli("unlink", "afile"))
d.addCallback(_check)
self.basedir = "cli/Rm/rm_without_alias"
self.set_up_grid()
d = self.do_cli("rm", "afile")
@ -2449,6 +2452,9 @@ class Rm(GridTestMixin, CLITestMixin, unittest.TestCase):
# 'tahoe rm' should behave sensibly when invoked with an explicit
# alias that doesn't exist.
self.basedir = "cli/Rm/rm_with_nonexistent_alias"
d.addCallback(lambda ign: self.do_cli("unlink", "nonexistent:afile"))
d.addCallback(_check)
self.set_up_grid()
d = self.do_cli("rm", "nonexistent:afile")
def _check((rc, out, err)):