hgweb broken in current tip?

Matt Mackall mpm at selenic.com
Sun Sep 25 05:13:09 CDT 2005


On Sat, Sep 24, 2005 at 11:49:01PM -0700, Jeremy Fitzhardinge wrote:
> Michal Kvasnica wrote:
> 
> >--- hgweb.py.orig       2005-09-24 11:08:26.396337000 +0200
> >+++ hgweb.py    2005-09-24 11:08:28.766314000 +0200
> >@@ -27,7 +27,7 @@
> >         return "%d %s" % (c, plural(t, c))
> >
> >     now = time.time()
> >-    then = x[0]
> >+    then = x
> >     delta = max(1, int(now - then))
> >
> >     scales = [["second", 1],
> >
> >  
> >
> I just encountered this too.  Unfortunately this change breaks when you
> actually select a repository, because then 'x' becomes a tuple and x[0]
> is the right thing to do.  I guess the stat mtime should be wrapped in a
> tuple.

Yes, all the date code should now be using pairs of (seconds since
epoch, timezone offset). There's a change in tip that actually gets
the timezone right here (though the current hgwebdir templates don't
use it).

Unfortunately the server was down all day for an unscheduled security
audit and upgrade.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list