ソースを参照

also show the number of files processed in --progress

Antoine Beaupré 9 年 前
コミット
3827c2b107
2 ファイル変更5 行追加6 行削除
  1. 3 4
      borg/archiver.py
  2. 2 2
      borg/helpers.py

+ 3 - 4
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')

+ 2 - 2
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')