]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Remove -u shortcut for 'tahoe ls --uri' which clashes with --node-url. fixes ticket...
authorDaira Hopwood <daira@jacaranda.org>
Tue, 2 Feb 2016 18:45:52 +0000 (18:45 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 2 Feb 2016 18:45:52 +0000 (18:45 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/scripts/cli.py
src/allmydata/test/test_cli.py

index ef4fc71fe9ca2f7713fea2e9afae96f38400473a..722c8d983b5b55694841f62eb0904ee7b4ea6f46 100644 (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."),
index bed358711097576337996af159f675ba7e4400ab..789e177d15c0689453ec9b9354db2f826a86fd2d 100644 (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")