comparison python/repostats.py2 @ 120:bb08633510bf

Added repostat script
author Windel Bouwman
date Sat, 12 Jan 2013 10:56:12 +0100
parents
children 347d7d8b96c0
comparison
equal deleted inserted replaced
119:f51791638cae 120:bb08633510bf
1 #!/usr/bin/python2
2
3 from mercurial import ui, hg
4 import datetime
5
6 u = ui.ui()
7 repo = hg.repository(u, '..')
8
9 stamps = []
10 nds = repo.changelog.nodesbetween()
11 print len(nds), nds
12 for hexid in nds[0]:
13 cset = repo.changelog.read(hexid)
14 print cset
15 ts = cset[2][0]
16 stamps.append(ts)
17
18 print len(stamps)
19 dts = [datetime.datetime.fromtimestamp(st) for st in stamps]
20 print dts
21