mercurial/hgweb.py
changeset 600 11c379e23ad6
parent 599 765182a4c843
child 601 8865eb8ade99
equal deleted inserted replaced
599:765182a4c843 600:11c379e23ad6
   107         except KeyError:
   107         except KeyError:
   108             tmpl = self.cache[t] = file(self.map[t]).read()
   108             tmpl = self.cache[t] = file(self.map[t]).read()
   109         return template(tmpl, self.filters, **map)
   109         return template(tmpl, self.filters, **map)
   110 
   110 
   111 def rfc822date(x):
   111 def rfc822date(x):
   112     month= [None,"Jan", "Feb", "Mar", "Apr", "May", "Jun",
   112     return strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime(x))
   113                  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
       
   114     yyyy,mon,dd,hh,mm,ss,wd,x,y = time.gmtime(x)
       
   115     return "%d %s %d %d:%d:%d"%(dd, month[mon], yyyy, hh, mm, ss)
       
   116 
   113 
   117 class hgweb:
   114 class hgweb:
   118     maxchanges = 10
   115     maxchanges = 10
   119     maxfiles = 10
   116     maxfiles = 10
   120 
   117