convert_svn ("release early" edition)

Matt Mackall mpm at selenic.com
Mon Apr 9 13:58:19 CDT 2007


On Mon, Apr 09, 2007 at 02:56:34PM -0400, Daniel Holth wrote:
> Matt Mackall wrote:
> > Taking a peek at this, some comments:
> >
> > interface:
> >
> >  Actually making your convert_whatever a base class for the other
> >  classes is probably worth doing. Call it class converter.
> >   
> Will do.
> > tzinfo:
> >
> >  What's this for, exactly? This probably wants to be replaced with
> >  util.parsedate.
> >   
> A Subversion timestamp looks like this, is in UTC, and includes
> microseconds. util.parsedate() doesn't handle this:
> '2007-01-04T17:35:00.902377Z'

Something like this should do the trick:

util.parsedate(date[:18] + " UTC", ["%Y-%m-%dT%H:%M:%S"])

At least until we can get it to handle fractional seconds.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list