소스 검색

Let prune accept and pass the progress argument

Abogical 8 년 전
부모
커밋
029469d544
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/borg/archiver.py

+ 5 - 1
src/borg/archiver.py

@@ -1024,7 +1024,8 @@ class Archiver:
                     else:
                     else:
                         if args.output_list:
                         if args.output_list:
                             list_logger.info('Pruning archive: %s' % format_archive(archive))
                             list_logger.info('Pruning archive: %s' % format_archive(archive))
-                        Archive(repository, key, manifest, archive.name, cache).delete(stats, forced=args.forced)
+                        Archive(repository, key, manifest, archive.name, cache,
+                                progress=args.progress).delete(stats, forced=args.forced)
                 else:
                 else:
                     if args.output_list:
                     if args.output_list:
                         list_logger.info('Keeping archive: %s' % format_archive(archive))
                         list_logger.info('Keeping archive: %s' % format_archive(archive))
@@ -2244,6 +2245,9 @@ class Archiver:
         subparser.add_argument('--force', dest='forced',
         subparser.add_argument('--force', dest='forced',
                                action='store_true', default=False,
                                action='store_true', default=False,
                                help='force pruning of corrupted archives')
                                help='force pruning of corrupted archives')
+        subparser.add_argument('-p', '--progress', dest='progress',
+                               action='store_true', default=False,
+                               help='show progress display while deleting archives')
         subparser.add_argument('-s', '--stats', dest='stats',
         subparser.add_argument('-s', '--stats', dest='stats',
                                action='store_true', default=False,
                                action='store_true', default=False,
                                help='print statistics for the deleted archive')
                                help='print statistics for the deleted archive')