From b1c64e2f87430cd4530500da9ae3cf43664b3df6 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Thu, 4 Feb 2010 18:58:40 -0500 Subject: [PATCH] bup index: fix progress message printing when using -v. It wasn't printing often enough, and thus was absent more often than present. --- cmd-index.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd-index.py b/cmd-index.py index da0bda7..c64f8f2 100755 --- a/cmd-index.py +++ b/cmd-index.py @@ -89,12 +89,13 @@ def update_index(top): total = 0 for (path,pst) in drecurse.recursive_dirlist([top], xdev=opt.xdev): #log('got: %r\n' % path) - if not (total % 128): - progress('Indexing: %d\r' % total) - total += 1 if opt.verbose>=2 or (opt.verbose==1 and stat.S_ISDIR(pst.st_mode)): sys.stdout.write('%s\n' % path) sys.stdout.flush() + progress('Indexing: %d\r' % total) + elif not (total % 128): + progress('Indexing: %d\r' % total) + total += 1 while rig.cur and rig.cur.name > path: # deleted paths rig.cur.set_deleted() rig.cur.repack() -- 2.39.2