diff mercurial/context.py @ 26492:3a0bb61371c5

util: extract stub function to get mtime with second accuracy This function is trivial but will need a long comment why it can't use st.st_mtime. See the next patch for details.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 04 Oct 2015 22:25:29 +0900
parents 18541e9510c5
children 56b2bcea2529
line wrap: on
line diff
--- a/mercurial/context.py	Mon Oct 05 14:37:59 2015 -0700
+++ b/mercurial/context.py	Sun Oct 04 22:25:29 2015 +0900
@@ -1690,7 +1690,7 @@
     def date(self):
         t, tz = self._changectx.date()
         try:
-            return (int(self._repo.wvfs.lstat(self._path).st_mtime), tz)
+            return (util.statmtimesec(self._repo.wvfs.lstat(self._path)), tz)
         except OSError as err:
             if err.errno != errno.ENOENT:
                 raise