]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/scripts/tahoe_put.py
add --format= to 'tahoe put'/'mkdir', remove --mutable-type. Closes #1561
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / scripts / tahoe_put.py
index 3a3b39458e679ce1da010dcb7ff9d7eab6d9f90f..a85539efec87e0d96f4a839705a4261212848ac8 100644 (file)
@@ -18,7 +18,7 @@ def put(options):
     from_file = options.from_file
     to_file = options.to_file
     mutable = options['mutable']
-    mutable_type = options['mutable-type']
+    format = options['format']
     if options['quiet']:
         verbosity = 0
     else:
@@ -64,14 +64,13 @@ def put(options):
         # unlinked upload
         url = nodeurl + "uri"
 
-    file_format = None
+    queryargs = []
     if mutable:
-        file_format = "SDMF"
-    if mutable_type:
-        assert mutable
-        file_format = mutable_type.upper()
-    if file_format:
-        url += "?format=%s" % file_format
+        queryargs.append("mutable=true")
+    if format:
+        queryargs.append("format=%s" % format)
+    if queryargs:
+        url += "?" + "&".join(queryargs)
 
     if from_file:
         infileobj = open(os.path.expanduser(from_file), "rb")