Merge pull request #683 from tahoe-lafs/1827.remove-tahoe-rm

Remove "tahoe rm"

Fixes: ticket:1827
This commit is contained in:
Jean-Paul Calderone 2020-01-20 11:09:30 -05:00 committed by GitHub
commit c4b6ca1c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 17 deletions

View File

@ -0,0 +1 @@
"tahoe rm", an old alias for "tahoe unlink", has been removed.

View File

@ -259,10 +259,6 @@ class UnlinkOptions(FileStoreOptions):
synopsis = "[options] REMOTE_FILE"
description = "Remove a named file from its parent directory."
class RmOptions(UnlinkOptions):
synopsis = "[options] REMOTE_FILE"
description = "Remove a named file from its parent directory."
class MvOptions(FileStoreOptions):
def parseArgs(self, frompath, topath):
self.from_file = argv_to_unicode(frompath)
@ -467,7 +463,6 @@ subCommands = [
["put", None, PutOptions, "Upload a file into the grid."],
["cp", None, CpOptions, "Copy one or more files or directories."],
["unlink", None, UnlinkOptions, "Unlink a file or directory on the grid."],
["rm", None, RmOptions, "Unlink a file or directory on the grid (same as unlink)."],
["mv", None, MvOptions, "Move a file within the grid."],
["ln", None, LnOptions, "Make an additional link to an existing file or directory."],
["backup", None, BackupOptions, "Make target dir look like local dir."],

View File

@ -140,7 +140,7 @@ class GridTester(object):
if f not in oldfiles:
raise CommandFailed("um, '%s' was supposed to already be in %s"
% (f, dirname))
self.cli("rm", absfilename)
self.cli("unlink", absfilename)
newfiles = self.listdir(dirname)
if f in newfiles:
raise CommandFailed("failed to remove '%s' from %s" % (f, dirname))

View File

@ -570,10 +570,6 @@ class Help(unittest.TestCase):
help = str(cli.UnlinkOptions())
self.failUnlessIn("[options] REMOTE_FILE", help)
def test_rm(self):
help = str(cli.RmOptions())
self.failUnlessIn("[options] REMOTE_FILE", help)
def test_mv(self):
help = str(cli.MvOptions())
self.failUnlessIn("[options] FROM TO", help)
@ -1075,11 +1071,6 @@ class Unlink(GridTestMixin, CLITestMixin, unittest.TestCase):
return d
class Rm(Unlink):
"""Test that 'tahoe rm' behaves in the same way as 'tahoe unlink'."""
command = "rm"
class Stats(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_empty_directory(self):
self.basedir = "cli/Stats/empty_directory"

View File

@ -2227,8 +2227,8 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
self.failUnlessEqual(data, "data to be uploaded: file1\n")
d.addCallback(_check_outfile1)
d.addCallback(run, "rm", "tahoe-file0")
d.addCallback(run, "rm", "tahoe:file2")
d.addCallback(run, "unlink", "tahoe-file0")
d.addCallback(run, "unlink", "tahoe:file2")
d.addCallback(run, "ls")
d.addCallback(_check_ls, [], ["tahoe-file0", "file2"])