##// END OF EJS Templates
util.datestr: do not crash on revisions with negative timestamp (issue2513)...
util.datestr: do not crash on revisions with negative timestamp (issue2513) Python's time.gmtime(lt) fails on Windows, producing a traceback with ValueError: (22, 'Invalid argument') if lt < -43200. We get a local time boundary value of -43200 if we take "the epoch" Thu Jan 01 00:00:00 1970 = time.gmtime(0) from timezone 'UTC+0' into timezone 'UTC-12'. All other timezones will have larger local time values for that point in time. Aborting with a traceback on 'hg log' for revisions with a timestamp value < -43200 is clearly not acceptable. Returning "invalid timestamp" or similar as string representation is not an option either, since that may crash other tools which parse the output of 'hg log'. Instead, we teach util.datestr() to return the epoch in timezone UTC+0 on *all platforms*, represented by the string Thu Jan 01 00:00:00 1970 +0000 if the timestamp's unix time value is negative. (based on a patch originally proposed by Benjamin Pollack)
Adrian Buehlmann -
r13039:dd24f3e7 stable
Show More
Name Size Modified Last Commit Author
contrib
doc
hgext
i18n
mercurial
tests
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
setup.py Loading ...

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

$ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help

See http://mercurial.selenic.com/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.