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."),
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")