]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/scripts/tahoe_mkdir.py
cli: teach CLI how to create MDMF mutable files
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / scripts / tahoe_mkdir.py
index dbcabac6ee58afb656f25bd5154945b5b73b1ea3..50ed0672a2291ea86e5183b7326e77df1f1cfadc 100644 (file)
@@ -22,6 +22,8 @@ def mkdir(options):
     if not where or not path:
         # create a new unlinked directory
         url = nodeurl + "uri?t=mkdir"
+        if options["mutable-type"]:
+            url += "&mutable-type=%s" % urllib.quote(options['mutable-type'])
         resp = do_http("POST", url)
         rc = check_http_error(resp, stderr)
         if rc:
@@ -37,6 +39,9 @@ def mkdir(options):
     # path must be "/".join([s.encode("utf-8") for s in segments])
     url = nodeurl + "uri/%s/%s?t=mkdir" % (urllib.quote(rootcap),
                                            urllib.quote(path))
+    if options['mutable-type']:
+        url += "&mutable-type=%s" % urllib.quote(options['mutable-type'])
+
     resp = do_http("POST", url)
     check_http_error(resp, stderr)
     new_uri = resp.read().strip()