From: Avery Pennarun Date: Thu, 4 Feb 2010 23:58:40 +0000 (-0500) Subject: bup index: fix progress message printing when using -v. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b1c64e2f87430cd4530500da9ae3cf43664b3df6;p=packages%2Fb%2Fbup.git bup index: fix progress message printing when using -v. It wasn't printing often enough, and thus was absent more often than present. --- 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()