Remove -u shortcut for 'tahoe ls --uri' which clashes with --node-url. fixes ticket:1949, ticket:2137

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2016-02-02 18:45:52 +00:00
parent 498563da69
commit 0d6fcf445e
2 changed files with 14 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class ListAliasesOptions(FilesystemOptions):
class ListOptions(FilesystemOptions):
optFlags = [
("long", "l", "Use long format: show file sizes, and timestamps."),
("uri", "u", "Show file/directory URIs."),
("uri", None, "Show file/directory URIs."),
("readonly-uri", None, "Show read-only file/directory URIs."),
("classify", "F", "Append '/' to directory names, and '*' to mutable."),
("json", None, "Show the raw JSON output."),

View File

@ -1242,6 +1242,19 @@ class Options(ReallyEqualMixin, unittest.TestCase):
self.failUnlessEqual(o.aliases[DEFAULT_ALIAS], private_uri)
self.failUnlessEqual(o.where, u"")
# -u for --node-url used to clash with -u for --uri (tickets #1949 and #2137).
o = parse2(["-u", "http://example.org:8111/"])
self.failUnlessEqual(o['node-url'], "http://example.org:8111/")
self.failUnlessEqual(o.aliases[DEFAULT_ALIAS], private_uri)
self.failUnlessEqual(o.where, u"")
self.failIf(o["uri"])
o = parse2(["-u", "http://example.org:8111/", "--uri"])
self.failUnlessEqual(o['node-url'], "http://example.org:8111/")
self.failUnlessEqual(o.aliases[DEFAULT_ALIAS], private_uri)
self.failUnlessEqual(o.where, u"")
self.failUnless(o["uri"])
o = parse2(["--dir-cap", "root"])
self.failUnlessEqual(o['node-url'], "http://localhost:8080/")
self.failUnlessEqual(o.aliases[DEFAULT_ALIAS], "root")