From e8dab60b680070026dea4580c8ee7ba58c3aba5f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 12 Nov 2014 12:23:43 +0100 Subject: [PATCH] Add path operation json file --- client/cli/bam.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/client/cli/bam.py b/client/cli/bam.py index d302c5e..fb28103 100755 --- a/client/cli/bam.py +++ b/client/cli/bam.py @@ -196,13 +196,10 @@ class bam_session: paths_used.add(fn_abs) else: - # TODO(cam) remove these from svn - print(" removing: %r" % fn_abs) paths_remove[fn_rel] = fn_abs # ---- # find new files - # TODO(cam) .bamignore def iter_files(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): @@ -501,6 +498,16 @@ class bam_commands: paths_remap_subset.update(paths_remap_subset_add) write_dict_as_json(".bam_paths_remap.json", paths_remap_subset) + # build a list of path manipulation operations + paths_ops = {} + # paths_remove ... + for fn_rel, fn_abs in paths_remove.items(): + # TODO + fn_abs_remote = paths_remap[fn_rel] + paths_ops[fn_abs_remote] = 'D' + + write_dict_as_json(".bam_paths_ops.json", paths_ops) + if os.path.exists(basedir_temp): import shutil shutil.rmtree(basedir_temp)