Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 36789:ffa3026d4196
cleanup: use stat_result[stat.ST_MTIME] instead of stat_result.st_mtime
The latter is floating point by default, and we've been doing
os.stat_float_times(False). Unfortunately, os.stat_float_times was
removed between Python 3.7.0a1 and 3.7.0b2, so we have to stop using
it.
Differential Revision: https://phab.mercurial-scm.org/D2696
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 05 Mar 2018 12:30:20 -0500 |
parents | 981f328d6d16 |
children | 7affcabf561e |
line wrap: on
line diff
--- a/mercurial/context.py Mon Mar 05 15:07:32 2018 -0500 +++ b/mercurial/context.py Mon Mar 05 12:30:20 2018 -0500 @@ -1893,7 +1893,7 @@ def date(self): t, tz = self._changectx.date() try: - return (self._repo.wvfs.lstat(self._path).st_mtime, tz) + return (self._repo.wvfs.lstat(self._path)[stat.ST_MTIME], tz) except OSError as err: if err.errno != errno.ENOENT: raise