mercurial/util.py
changeset 27016 448cbdab5883
parent 27015 341cb90ffd18
child 27066 6f1f8e88f036
--- a/mercurial/util.py	Thu Nov 19 13:21:24 2015 -0600
+++ b/mercurial/util.py	Thu Nov 19 13:15:17 2015 -0600
@@ -19,7 +19,6 @@
 import errno, shutil, sys, tempfile, traceback
 import re as remod
 import os, time, datetime, calendar, textwrap, signal, collections
-import stat
 import imp, socket, urllib
 import gc
 import bz2
@@ -926,20 +925,6 @@
     except AttributeError:
         return os.stat(fp.name)
 
-def statmtimesec(st):
-    """Get mtime as integer of seconds
-
-    'int(st.st_mtime)' cannot be used because st.st_mtime is computed as
-    'sec + 1e-9 * nsec' and double-precision floating-point type is too narrow
-    to represent nanoseconds. If 'nsec' is close to 1 sec, 'int(st.st_mtime)'
-    can be 'sec + 1'. (issue4836)
-    """
-    try:
-        return st[stat.ST_MTIME]
-    except (TypeError, IndexError):
-        # osutil.stat doesn't allow index access and its st_mtime is int
-        return st.st_mtime
-
 # File system features
 
 def checkcase(path):