216
print 'branch format:', b.controlfile('branch-format', 'r').readline().rstrip('\n')
218
def plural(n, base='', pl=None):
226
count_version_dirs = 0
228
count_status = {'A': 0, 'D': 0, 'M': 0, 'R': 0, '?': 0, 'I': 0, '.': 0}
229
for st_tup in bzrlib.diff_trees(b.basis_tree(), b.working_tree()):
231
count_status[fs] += 1
232
if fs not in ['I', '?'] and st_tup[4] == 'directory':
233
count_version_dirs += 1
236
print 'in the working tree:'
237
for name, fs in (('unchanged', '.'),
238
('modified', 'M'), ('added', 'A'), ('removed', 'D'),
239
('renamed', 'R'), ('unknown', '?'), ('ignored', 'I'),
241
print ' %5d %s' % (count_status[fs], name)
242
print ' %5d versioned subdirector%s' % (count_version_dirs,
243
plural(count_version_dirs, 'y', 'ies'))
246
print 'branch history:'
247
history = b.revision_history()
249
print ' %5d revision%s' % (revno, plural(revno))
252
committers.add(b.get_revision(rev).committer)
253
print ' %5d committer%s' % (len(committers), plural(len(committers)))
255
firstrev = b.get_revision(history[0])
256
age = int((time.time() - firstrev.timestamp) / 3600 / 24)
257
print ' %5d day%s old' % (age, plural(age))
258
print ' first revision: %s' % format_date(firstrev.timestamp,
261
lastrev = b.get_revision(history[-1])
262
print ' latest revision: %s' % format_date(lastrev.timestamp,
213
info.show_info(Branch('.'))