Skip to content

Commit

Permalink
Improve reporting for the "rsync" primitive
Browse files Browse the repository at this point in the history
When uploading a larger code base to the device, rshell reports well
about "Adding ..." files when actually uploading them. However, if
timestamps haven't changed at all, it would be silent for a while,
while checking all the files about whether they should be updated
without giving appropriate feedback to the user.

This change introduces a "Checking ..." message for each file
in order to be more verbose about what is actually going on.
  • Loading branch information
amotl committed Mar 6, 2020
1 parent f38a350 commit 633e10c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rshell/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ def rsync(src_dir, dst_dir, mirror, dry_run, print_func, recursed, sync_hidden):
"'{}' is a directory. Ignoring"
print_err(msg.format(src_filename, dst_filename))
else:
print_func('Checking {}'.format(dst_filename))
if stat_mtime(src_stat) > stat_mtime(dst_stat):
msg = "{} is newer than {} - copying"
print_func(msg.format(src_filename, dst_filename))
Expand Down

0 comments on commit 633e10c

Please sign in to comment.