16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
from osutils import format_date
21
from bzrlib.osutils import format_date
25
24
def _countiter(it):
37
print 'branch format:', b.controlfile('branch-format', 'r').readline().rstrip('\n')
36
print 'branch format:', b.control_files.get_utf8(
37
'branch-format').readline().rstrip('\n')
39
39
def plural(n, base='', pl=None):
82
82
history = b.revision_history()
83
83
revno = len(history)
84
84
print ' %8d revision%s' % (revno, plural(revno))
86
86
for rev in history:
87
committers.add(b.get_revision(rev).committer)
87
committers[b.repository.get_revision(rev).committer] = True
88
88
print ' %8d committer%s' % (len(committers), plural(len(committers)))
90
firstrev = b.get_revision(history[0])
90
firstrev = b.repository.get_revision(history[0])
91
91
age = int((time.time() - firstrev.timestamp) / 3600 / 24)
92
92
print ' %8d day%s old' % (age, plural(age))
93
93
print ' first revision: %s' % format_date(firstrev.timestamp,
96
lastrev = b.get_revision(history[-1])
96
lastrev = b.repository.get_revision(history[-1])
97
97
print ' latest revision: %s' % format_date(lastrev.timestamp,
102
c, t = b.text_store.total_size()
103
print ' %8d file texts' % c
104
print ' %8d kB' % (t/1024)
101
# print 'text store:'
102
# c, t = b.text_store.total_size()
103
# print ' %8d file texts' % c
104
# print ' %8d kB' % (t/1024)
107
107
print 'revision store:'
108
c, t = b.revision_store.total_size()
108
c, t = b.repository.revision_store.total_size()
109
109
print ' %8d revisions' % c
110
110
print ' %8d kB' % (t/1024)
114
print 'inventory store:'
115
c, t = b.inventory_store.total_size()
116
print ' %8d inventories' % c
117
print ' %8d kB' % (t/1024)
114
# print 'inventory store:'
115
# c, t = b.inventory_store.total_size()
116
# print ' %8d inventories' % c
117
# print ' %8d kB' % (t/1024)