1 # stats - get stats on the given repo
6 # figure out what repo path to use
12 client
= hglib
.open(repo
)
15 revs
= int(client
.tip().rev
)
16 files
= len(list(client
.manifest()))
17 heads
= len(client
.heads())
18 branches
= len(client
.branches())
19 tags
= len(client
.tags()) - 1 # don't count tip
22 for e
in client
.log():
23 authors
[e
.author
] = True
26 for e
in client
.log(onlymerges
=True):
29 print "%d revisions" % revs
30 print "%d merges" % merges
31 print "%d files" % files
32 print "%d heads" % heads
33 print "%d branches" % branches
34 print "%d tags" % tags
35 print "%d authors" % len(authors
)