Gather more information from annotate parsing.
Wed Sep 21 05:51:22 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Gather more information from annotate parsing.
Add a list of patches with their dates to the annotate object, because we'll
want to use them in patches to come. Also store the date in tuple format and
let the users do the conversion to text as they need to.
{
hunk ./darcsweb.cgi 674
+ self.lastchange_date = None
+ self.firstdate = None
+ self.lastdate = None
hunk ./darcsweb.cgi 678
+ self.patches = {}
hunk ./darcsweb.cgi 685
+ self.pdate = None
hunk ./darcsweb.cgi 720
- lastdate = time.strftime("%Y-%m-%d %H:%M:%S", lastdate)
- annotate.lastchange_date = fixu8(lastdate)
+ annotate.lastchange_date = lastdate
+
+ annotate.patches[annotate.lastchange_hash] = annotate.lastchange_date
+
+ # these will be overriden by the real dates later
+ annotate.firstdate = lastdate
+ annotate.lastdate = 0
hunk ./darcsweb.cgi 742
- pdate = time.strftime("%Y-%m-%d %H:%M:%S", pdate)
hunk ./darcsweb.cgi 762
- line.pdate = fixu8(pdate)
+ line.pdate = pdate
hunk ./darcsweb.cgi 764
+ annotate.patches[line.phash] = line.pdate
+
+ if pdate > annotate.lastdate:
+ annotate.lastdate = pdate
+ if pdate < annotate.firstdate:
+ annotate.firstdate = pdate
hunk ./darcsweb.cgi 997
- title = "%s by %s" % (l.pdate, escape(l.pauthor) )
+ plongdate = time.strftime("%Y-%m-%d %H:%M:%S", l.pdate)
+ title = "%s by %s" % (plongdate, escape(l.pauthor) )
hunk ./darcsweb.cgi 1006
- pdate = time.strptime(l.pdate, "%Y-%m-%d %H:%M:%S")
- pdate = time.strftime("%Y-%m-%d", pdate)
+ pdate = time.strftime("%Y-%m-%d", l.pdate)
}