From 3827c2b1074470e5b693506c89bd41c213c49c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Thu, 15 Oct 2015 21:13:59 -0400 Subject: [PATCH] also show the number of files processed in --progress --- borg/archiver.py | 7 +++---- borg/helpers.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/borg/archiver.py b/borg/archiver.py index 72ad7f9f3..5f1910ac9 100644 --- a/borg/archiver.py +++ b/borg/archiver.py @@ -670,10 +670,9 @@ Type "Yes I am sure" if you understand this and want to continue.\n""") help='print statistics for the created archive') subparser.add_argument('-p', '--progress', dest='progress', action='store_true', default=False, - help="""print progress while creating - the archive, showing Original, - Compressed and Deduplicated sizes, - followed by the path being processd""") + help="""print progress while creating the archive, showing Original, + Compressed and Deduplicated sizes, followed by the Number of files seen + and the path being processd""") subparser.add_argument('-e', '--exclude', dest='excludes', type=ExcludePattern, action='append', metavar="PATTERN", help='exclude paths matching PATTERN') diff --git a/borg/helpers.py b/borg/helpers.py index e3d6bc8cf..d0b5b7ad8 100644 --- a/borg/helpers.py +++ b/borg/helpers.py @@ -177,8 +177,8 @@ class Statistics: path = remove_surrogates(item[b'path']) if item else '' if len(path) > 43: path = '%s...%s' % (path[:20], path[-20:]) - msg = '%9s O %9s C %9s D %-43s' % ( - format_file_size(self.osize), format_file_size(self.csize), format_file_size(self.usize), path) + msg = '%9s O %9s C %9s D %d N %-43s' % ( + format_file_size(self.osize), format_file_size(self.csize), format_file_size(self.usize), self.nfiles, path) else: msg = ' ' * 79 print(msg, file=sys.stderr, end='\r')