When copying a collection that already exists on the destination, fetch
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 17 Mar 2015 17:35:42 +0000 (13:35 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 17 Mar 2015 17:35:42 +0000 (13:35 -0400)
manifest text from the destination in order to create a new collection with the
correct signing tokens.  closes #5475

sdk/python/arvados/commands/arv_copy.py

index 9e6d4312f3ef233ac1daa223b598099be1e7d29b..75f8ca97bd0025fc5d4147ee8925df68b995a159 100755 (executable)
@@ -506,7 +506,9 @@ def copy_collection(obj_uuid, src, dst, args):
                     (c.get('name') == d['name']) and
                     (c['portable_data_hash'] == d['portable_data_hash'])):
                     return d
-
+            c['manifest_text'] = dst.collections().get(
+                uuid=dstcol['items'][0]['uuid']
+            ).execute(num_retries=args.retries)['manifest_text']
             return create_collection_from(c, src, dst, args)
 
     # Fetch the collection's manifest.