Fix "Number of files" output for attic info.

Closes #124
This commit is contained in:
Jonas Borgström 2014-10-27 22:00:56 +01:00
parent 547fa0a590
commit 678fdd1d42
3 changed files with 3 additions and 1 deletions

View File

@ -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
------------

View File

@ -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

View File

@ -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