From 678fdd1d426be0d4ed02e7417d37786eb1d3c8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Mon, 27 Oct 2014 22:00:56 +0100 Subject: [PATCH] Fix "Number of files" output for attic info. Closes #124 --- CHANGES | 1 + attic/archiver.py | 2 +- attic/testsuite/archiver.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index a5a5fd24c..40ba180ab 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Version 0.14 - Add workaround for old Linux systems without acl_extended_file_no_follow (#96) - Add MacPorts' path to the default openssl search path (#101) - HashIndex improvements, eliminates unnecessary IO on low memory systems. +- Fix "Number of files" output for attic info. (#124) Version 0.13 ------------ diff --git a/attic/archiver.py b/attic/archiver.py index 6d9a37463..a1a318361 100644 --- a/attic/archiver.py +++ b/attic/archiver.py @@ -309,7 +309,7 @@ Type "Yes I am sure" if you understand this and want to continue.\n""") print('Username:', archive.metadata[b'username']) print('Time: %s' % to_localtime(archive.ts).strftime('%c')) print('Command line:', remove_surrogates(' '.join(archive.metadata[b'cmdline']))) - print('Number of files: %d' % archive.stats.nfiles) + print('Number of files: %d' % stats.nfiles) stats.print_('This archive:', cache) return self.exit_code diff --git a/attic/testsuite/archiver.py b/attic/testsuite/archiver.py index 5714b2bbe..382fcc854 100644 --- a/attic/testsuite/archiver.py +++ b/attic/testsuite/archiver.py @@ -159,6 +159,7 @@ class ArchiverTestCase(ArchiverTestCaseBase): self.assert_equal(len(self.attic('list', self.repository_location + '::test').splitlines()), 11) self.assert_dirs_equal('input', 'output/input') info_output = self.attic('info', self.repository_location + '::test') + self.assert_in('Number of files: 4', info_output) shutil.rmtree(self.cache_path) info_output2 = self.attic('info', self.repository_location + '::test') # info_output2 starts with some "initializing cache" text but should