[ARVADOS] updated: 74784b33fd7b8b519b0ce0cbbdfa16dba2dad219

git at public.curoverse.com git at public.curoverse.com
Tue Feb 17 16:04:41 EST 2015


Summary of changes:
 sdk/python/arvados/commands/arv_copy.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

       via  74784b33fd7b8b519b0ce0cbbdfa16dba2dad219 (commit)
      from  bef0f85f2eb6bbdaa57781e6f98bc062a62ba560 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 74784b33fd7b8b519b0ce0cbbdfa16dba2dad219
Author: Peter Amstutz <peter.amstutz at clinicalfuture.com>
Date:   Tue Feb 17 21:04:38 2015 +0000

    4520: tested copying, fixed bad 'properties' field

diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py
index 7f5468e..57f79b8 100755
--- a/sdk/python/arvados/commands/arv_copy.py
+++ b/sdk/python/arvados/commands/arv_copy.py
@@ -412,7 +412,14 @@ def copy_collection(obj_uuid, src, dst, args):
             filters=[['portable_data_hash', '=', colhash]]
         ).execute()
         if dstcol['items_available'] > 0:
-            logger.debug("Skipping collection %s (already at dst)", obj_uuid)
+            if args.project_uuid:
+                c['owner_uuid'] = args.project_uuid
+                del c['uuid']
+                if 'properties' in c:
+                    del c['properties']
+                return dst.collections().create(body=c, ensure_unique_name=True).execute()
+            else:
+                logger.info("Skipping collection %s (already at dst)", obj_uuid)
             return dstcol['items'][0]
 
     # Fetch the collection's manifest.
@@ -467,8 +474,9 @@ def copy_collection(obj_uuid, src, dst, args):
     logger.debug('saving %s with manifest: <%s>', obj_uuid, dst_manifest)
     dst_keep.put(dst_manifest)
 
-    if 'uuid' in c:
-        del c['uuid']
+    del c['uuid']
+    if 'properties' in c:
+        del c['properties']
 
     if args.project_uuid:
         c['owner_uuid'] = args.project_uuid

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list