3 # Generate a database of commits and major versions they went into.
5 # committags [git-args]
12 git
= 'git log --decorate '
14 git
+= ' '.join(sys
.argv
[1:])
15 input = os
.popen(git
, 'r')
20 tagline
= re
.compile(r
'^commit ([\da-f]+) .*tag: (v2\.6\.\d\d)')
21 commit
= re
.compile(r
'^commit ([\da-f]+)')
23 for line
in input.readlines():
24 if not line
.startswith('commit'):
25 continue # This makes it go faster
26 m
= tagline
.search(line
)
28 DB
[m
.group(1)] = Tag
= m
.group(2)
30 m
= commit
.search(line
)
34 print 'Found %d commits' % (len(DB
.keys()))
35 out
= open('committags.db', 'w')