| ... | ... |
@@ -393,7 +393,7 @@ def compare_filelists(src_list, dst_list, src_remote, dst_remote, delay_updates |
| 393 | 393 |
"""Return True if src_list[file] matches dst_list[file], else False""" |
| 394 | 394 |
attribs_match = True |
| 395 | 395 |
if not (src_list.has_key(file) and dst_list.has_key(file)): |
| 396 |
- info(u"file does not exist in one side or the other: src_list=%s, dst_list=%s" % (src_list.has_key(file), dst_list.has_key(file))) |
|
| 396 |
+ info(u"%s: does not exist in one side or the other: src_list=%s, dst_list=%s" % (file, src_list.has_key(file), dst_list.has_key(file))) |
|
| 397 | 397 |
return False |
| 398 | 398 |
|
| 399 | 399 |
## check size first |
| ... | ... |
@@ -437,7 +437,6 @@ def compare_filelists(src_list, dst_list, src_remote, dst_remote, delay_updates |
| 437 | 437 |
## Items left on dst_list will be deleted |
| 438 | 438 |
copy_pairs = [] |
| 439 | 439 |
|
| 440 |
- |
|
| 441 | 440 |
debug("Comparing filelists (direction: %s -> %s)" % (__direction_str(src_remote), __direction_str(dst_remote)))
|
| 442 | 441 |
|
| 443 | 442 |
for relative_file in src_list.keys(): |
| ... | ... |
@@ -452,13 +451,15 @@ def compare_filelists(src_list, dst_list, src_remote, dst_remote, delay_updates |
| 452 | 452 |
continue |
| 453 | 453 |
|
| 454 | 454 |
try: |
| 455 |
- compare_result = _compare(src_list, dst_list, src_remote, dst_remote, relative_file) |
|
| 455 |
+ same_file = _compare(src_list, dst_list, src_remote, dst_remote, relative_file) |
|
| 456 | 456 |
except (IOError,OSError), e: |
| 457 |
+ debug(u"IGNR: %s (disappeared)" % (relative_file)) |
|
| 458 |
+ warning(u"%s: file disappeared, ignoring." % (relative_file)) |
|
| 457 | 459 |
del(src_list[relative_file]) |
| 458 | 460 |
del(dst_list[relative_file]) |
| 459 | 461 |
continue |
| 460 | 462 |
|
| 461 |
- if compare_result: |
|
| 463 |
+ if same_file: |
|
| 462 | 464 |
debug(u"IGNR: %s (transfer not needed)" % relative_file) |
| 463 | 465 |
del(src_list[relative_file]) |
| 464 | 466 |
del(dst_list[relative_file]) |
| ... | ... |
@@ -472,7 +473,7 @@ def compare_filelists(src_list, dst_list, src_remote, dst_remote, delay_updates |
| 472 | 472 |
if md5 is not None and dst_list.by_md5.has_key(md5): |
| 473 | 473 |
# Found one, we want to copy |
| 474 | 474 |
dst1 = list(dst_list.by_md5[md5])[0] |
| 475 |
- debug(u"REMOTE COPY src: %s -> %s" % (dst1, relative_file)) |
|
| 475 |
+ debug(u"DST COPY src: %s -> %s" % (dst1, relative_file)) |
|
| 476 | 476 |
copy_pairs.append((src_list[relative_file], dst1, relative_file)) |
| 477 | 477 |
del(src_list[relative_file]) |
| 478 | 478 |
del(dst_list[relative_file]) |
| ... | ... |
@@ -494,7 +495,7 @@ def compare_filelists(src_list, dst_list, src_remote, dst_remote, delay_updates |
| 494 | 494 |
dst1 = dst_list.find_md5_one(md5) |
| 495 | 495 |
if dst1 is not None: |
| 496 | 496 |
# Found one, we want to copy |
| 497 |
- debug(u"REMOTE COPY dst: %s -> %s" % (dst1, relative_file)) |
|
| 497 |
+ debug(u"DST COPY dst: %s -> %s" % (dst1, relative_file)) |
|
| 498 | 498 |
copy_pairs.append((src_list[relative_file], dst1, relative_file)) |
| 499 | 499 |
del(src_list[relative_file]) |
| 500 | 500 |
else: |
| ... | ... |
@@ -763,7 +763,7 @@ def cmd_sync_remote2local(args): |
| 763 | 763 |
for key in local_list: |
| 764 | 764 |
output(u"delete: %s" % local_list[key]['full_name_unicode']) |
| 765 | 765 |
for key in remote_list: |
| 766 |
- output(u"download: %s -> %s" % (remote_list[key]['object_uri_str'], remote_list[key]['local_filename'])) |
|
| 766 |
+ output(u"download: %s -> %s" % (unicodise(remote_list[key]['object_uri_str']), unicodise(remote_list[key]['local_filename']))) |
|
| 767 | 767 |
for key in update_list: |
| 768 | 768 |
output(u"download: %s -> %s" % (update_list[key]['object_uri_str'], update_list[key]['local_filename'])) |
| 769 | 769 |
|