~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

  • Committer: Vincent Ladeuil
  • Date: 2007-10-23 07:15:13 UTC
  • mfrom: (2926 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071023071513-elryt6g2at34d2ur
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
                (bytes, parents, repo_kind, revision_id, file_id))
74
74
            if file_id is not None:
75
75
                file_ids.add(file_id)
76
 
        print >> self.outf, 'Records'
 
76
        self.outf.write('Records\n')
77
77
        for kind, records in sorted(by_kind.iteritems()):
78
78
            multiparent = sum(1 for b, m, k, r, f in records if
79
79
                              len(m.get('parents', [])) > 1)
80
 
            print >> self.outf, '%s: %d (%d multiparent)' % \
81
 
                (kind, len(records), multiparent)
82
 
        print >> self.outf, 'unique files: %d' % len(file_ids)
83
 
        print >> self.outf
 
80
            self.outf.write('%s: %d (%d multiparent)\n' % \
 
81
                (kind, len(records), multiparent))
 
82
        self.outf.write('unique files: %d\n' % len(file_ids))
 
83
        self.outf.write('\n')
84
84
        nicks = set()
85
85
        committers = set()
86
86
        for revision in bundle_info.real_revisions:
88
88
                nicks.add(revision.properties['branch-nick'])
89
89
            committers.add(revision.committer)
90
90
 
91
 
        print >> self.outf, 'Revisions'
92
 
        print >> self.outf, ('nicks: %s'
93
 
            % ', '.join(sorted(nicks))).encode(term_encoding, 'replace')
94
 
        print >> self.outf, ('committers: \n%s' %
95
 
        '\n'.join(sorted(committers)).encode(term_encoding, 'replace'))
 
91
        self.outf.write('Revisions\n')
 
92
        self.outf.write(('nicks: %s\n'
 
93
            % ', '.join(sorted(nicks))).encode(term_encoding, 'replace'))
 
94
        self.outf.write(('committers: \n%s\n' %
 
95
        '\n'.join(sorted(committers)).encode(term_encoding, 'replace')))
96
96
        if verbose:
97
 
            print >> self.outf
 
97
            self.outf.write('\n')
98
98
            bundle_file.seek(0)
99
99
            line = bundle_file.readline()
100
100
            line = bundle_file.readline()
101
101
            content = bundle_file.read().decode('bz2')
102
 
            print >> self.outf, "Decoded contents"
 
102
            self.outf.write("Decoded contents\n")
103
103
            self.outf.write(content)
104
 
            print >> self.outf
 
104
            self.outf.write('\n')