Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into APPS-2856_nextflow_…
Browse files Browse the repository at this point in the history
…bahrain_region
  • Loading branch information
r-i-v-a committed Dec 11, 2024
2 parents e9663a1 + 3d7425c commit abd97d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/python/dxpy/cli/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def cp(args):
{"objects": src_objects,
"folders": src_folders,
"project": dest_proj,
"destination": dest_path})['exists']
"destination": dest_path,
"targetFileRelocation": args.target_file_relocation})['exists']
if len(exists) > 0:
print(fill('The following objects already existed in the destination container ' +
'and were left alone:') + '\n ' + '\n '.join(exists))
Expand Down
8 changes: 6 additions & 2 deletions src/python/dxpy/scripts/dx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,8 @@ def mv(args):
if src_results[0]['describe']['folder'] != dest_folder:
dxpy.api.project_move(src_proj,
{"objects": [result['id'] for result in src_results],
"destination": dest_folder})
"destination": dest_folder,
"targetFileRelocation": args.target_file_relocation})
for result in src_results:
dxpy.DXHTTPRequest('/' + result['id'] + '/rename',
{"project": src_proj,
Expand Down Expand Up @@ -1065,7 +1066,8 @@ def mv(args):
dxpy.api.project_move(src_proj,
{"objects": src_objects,
"folders": src_folders,
"destination": dest_path})
"destination": dest_path,
"targetFileRelocation": args.target_file_relocation})
except:
err_exit()

Expand Down Expand Up @@ -4803,6 +4805,7 @@ def positive_number(value):
nargs='+')
cp_sources_action.completer = DXPathCompleter()
parser_cp.add_argument('destination', help=fill('Folder into which to copy the sources or new pathname (if only one source is provided). Must be in a different project/container than all source paths.', width_adjustment=-15))
parser_cp.add_argument('--target-file-relocation', help='Allow symlink target file relocation in external storage while cloning a symlink.', action='store_true', default=False)
parser_cp.set_defaults(func=cp)
register_parser(parser_cp, categories='fs')

Expand All @@ -4818,6 +4821,7 @@ def positive_number(value):
nargs='+')
mv_sources_action.completer = DXPathCompleter()
parser_mv.add_argument('destination', help=fill('Folder into which to move the sources or new pathname (if only one source is provided). Must be in the same project/container as all source paths.', width_adjustment=-15))
parser_mv.add_argument('--target-file-relocation', help='Allow symlink target file relocation in external storage while moving a symlink.', action='store_true', default=False)
parser_mv.set_defaults(func=mv)
register_parser(parser_mv, categories='fs')

Expand Down

0 comments on commit abd97d5

Please sign in to comment.