[ARVADOS] updated: 45fcd8aeec29e7e3b86415811f2cf2a5beb82a54

git at public.curoverse.com git at public.curoverse.com
Mon Aug 17 17:35:32 EDT 2015


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

       via  45fcd8aeec29e7e3b86415811f2cf2a5beb82a54 (commit)
      from  d929be450d1886ac04d7c2c98cd16eb44f468413 (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 45fcd8aeec29e7e3b86415811f2cf2a5beb82a54
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Aug 17 17:34:09 2015 -0400

    6095: Stop demoting OrderedDicts to dicts in arv-copy.
    
    History: first there was 79564b0ac7d03327cc351bbd6df544ab1f776380.
    This preserved the order of copied pipeline templates, but that's in
    part because it stopped recursing through those templates.
    1b8caff3ad598744e4a0379b01fc95ca4838caa0 fixed the recursion, but then
    started losing the order again.  This retains the order by ensuring we
    copy OrderedDicts as OrderedDicts.
    
    Refs #6095, #7001.

diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py
index f728b2c..c1ee156 100755
--- a/sdk/python/arvados/commands/arv_copy.py
+++ b/sdk/python/arvados/commands/arv_copy.py
@@ -330,9 +330,10 @@ def copy_collections(obj, src, dst, args):
         obj = arvados.util.collection_uuid_pattern.sub(copy_collection_fn, obj)
         return obj
     elif isinstance(obj, dict):
-        return {v: copy_collections(obj[v], src, dst, args) for v in obj}
+        return type(v)((v, copy_collections(obj[v], src, dst, args))
+                       for v in obj)
     elif isinstance(obj, list):
-        return [copy_collections(v, src, dst, args) for v in obj]
+        return type(v)(copy_collections(v, src, dst, args) for v in obj)
     return obj
 
 def migrate_jobspec(jobspec, src, dst, dst_repo, args):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list