diff mercurial/util.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 7d132557e44a
children 13272104bb07
line wrap: on
line diff
--- a/mercurial/util.py	Mon Oct 05 14:37:59 2015 -0700
+++ b/mercurial/util.py	Sun Oct 04 22:25:29 2015 +0900
@@ -952,6 +952,9 @@
     except AttributeError:
         return os.stat(fp.name)
 
+def statmtimesec(st):
+    return int(st.st_mtime)
+
 # File system features
 
 def checkcase(path):