An earlier commit (
634df2f8b26a1439f22dc9f6a23d55a006bf0429) made 'bup save'
update the progress line much less frequently. Unfortunately, if you used
-v or -vv, this would mean that there was *no* progress bar for a short time
after every log() message (directory or filename). That made the progress
bar flicker annoyingly.
To fix it, make sure we reset the progress bar timer after every filename we
print with log(). It's subtle, but it makes a very visible difference.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lastprint = now
+def vlog(s):
+ global lastprint
+ lastprint = 0
+ log(s)
+
+
r = index.Reader(git.repo('bupindex'))
def already_saved(ent):
else:
status = ' '
if opt.verbose >= 2:
- log('%s %-70s\n' % (status, ent.name))
+ vlog('%s %-70s\n' % (status, ent.name))
elif not stat.S_ISDIR(ent.mode) and lastdir != dir:
if not lastdir.startswith(dir):
- log('%s %-70s\n' % (status, os.path.join(dir, '')))
+ vlog('%s %-70s\n' % (status, os.path.join(dir, '')))
lastdir = dir
if opt.progress: