8 def __init__(self
, cdate
):
11 def __cmp__(self
, other
):
12 return cmp(self
.cdate
, other
.cdate
)
15 return '<Commit %s>' % time
.strftime("%c", time
.localtime(self
.cdate
))
19 cdate
= int(git('log', '-1', '--pretty=format:%ct', sha1
)[0].strip())
22 class CommitCache(object):
24 def __init__(self
, filename
):
25 self
._db
= shelve
.open(filename
)
27 def __getitem__(self
, key
):
30 v
= self
._db
[key
] = Commit
.scan(key
)