/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Martin
  • Date: 2017-05-21 18:16:32 UTC
  • mto: (6621.2.22 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: gzlist@googlemail.com-20170521181632-kll0wqnsq8pipfpj
Use BytesIO or StringIO from bzrlib.sixish

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
__all__ = ['show_bzrdir_info']
20
20
 
21
 
from cStringIO import StringIO
22
21
import time
23
22
import sys
24
23
 
33
32
from bzrlib.errors import (NoWorkingTree, NotBranchError,
34
33
                           NoRepositoryPresent, NotLocalUrl)
35
34
from bzrlib.missing import find_unmerged
 
35
from bzrlib.sixish import (
 
36
    BytesIO,
 
37
    )
36
38
 
37
39
 
38
40
def plural(n, base='', pl=None):
329
331
 
330
332
def _show_repository_stats(repository, stats, outfile):
331
333
    """Show statistics about a repository."""
332
 
    f = StringIO()
 
334
    f = BytesIO()
333
335
    if 'revisions' in stats:
334
336
        revisions = stats['revisions']
335
337
        f.write('  %8d revision%s\n' % (revisions, plural(revisions)))