mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
Merge pull request #683 from tahoe-lafs/1827.remove-tahoe-rm
Remove "tahoe rm" Fixes: ticket:1827
This commit is contained in:
commit
c4b6ca1c7d
1
newsfragments/1827.removed
Normal file
1
newsfragments/1827.removed
Normal file
@ -0,0 +1 @@
|
||||
"tahoe rm", an old alias for "tahoe unlink", has been removed.
|
@ -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."],
|
||||
|
@ -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))
|
||||
|
@ -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"
|
||||
|
@ -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"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user