Fix for blendfile walker iterating over same paths twice
also fixes sha1 checks
This commit is contained in:
@@ -200,7 +200,7 @@ class bam_utils:
|
|||||||
params=payload,
|
params=payload,
|
||||||
auth=('bam', 'bam'),
|
auth=('bam', 'bam'),
|
||||||
files=files)
|
files=files)
|
||||||
print(r.text)
|
print("Return is:", r.text)
|
||||||
|
|
||||||
files['file'].close()
|
files['file'].close()
|
||||||
os.remove(temp_zip)
|
os.remove(temp_zip)
|
||||||
@@ -239,7 +239,7 @@ def subcommand_checkout_cb(args):
|
|||||||
bam_utils.checkout(args.paths)
|
bam_utils.checkout(args.paths)
|
||||||
|
|
||||||
def subcommand_commit_cb(args):
|
def subcommand_commit_cb(args):
|
||||||
bam_utils.commit(args.paths)
|
bam_utils.commit(args.paths, args.message)
|
||||||
|
|
||||||
|
|
||||||
def subcommand_update_cb(args):
|
def subcommand_update_cb(args):
|
||||||
|
@@ -213,6 +213,7 @@ class FilePath:
|
|||||||
if sub_block is not None:
|
if sub_block is not None:
|
||||||
yield from block_expand(sub_block, sub_block.code)
|
yield from block_expand(sub_block, sub_block.code)
|
||||||
else:
|
else:
|
||||||
|
if code == b'ID':
|
||||||
yield block
|
yield block
|
||||||
else:
|
else:
|
||||||
expand_codes = None
|
expand_codes = None
|
||||||
|
@@ -156,9 +156,8 @@ def pack(blendfile_src, blendfile_dst, mode='FILE',
|
|||||||
sha1.update(data)
|
sha1.update(data)
|
||||||
return sha1.hexdigest()
|
return sha1.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
for src, dst in path_copy_files:
|
for src, dst in path_copy_files:
|
||||||
paths_uuid[os.path.relpath(dst, base_dir_dst).decode('utf-8')] = sha1_for_file(dst)
|
paths_uuid[os.path.relpath(dst, base_dir_dst).decode('utf-8')] = sha1_for_file(src)
|
||||||
# XXX, better way to store temp target
|
# XXX, better way to store temp target
|
||||||
blendfile_dst_tmp = temp_remap_cb(blendfile_src, 0)
|
blendfile_dst_tmp = temp_remap_cb(blendfile_src, 0)
|
||||||
paths_uuid[os.path.basename(blendfile_src).decode('utf-8')] = sha1_for_file(blendfile_dst_tmp)
|
paths_uuid[os.path.basename(blendfile_src).decode('utf-8')] = sha1_for_file(blendfile_dst_tmp)
|
||||||
|
Reference in New Issue
Block a user