Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
26491:366d489295ca | 26492:3a0bb61371c5 |
---|---|
950 try: | 950 try: |
951 return os.fstat(fp.fileno()) | 951 return os.fstat(fp.fileno()) |
952 except AttributeError: | 952 except AttributeError: |
953 return os.stat(fp.name) | 953 return os.stat(fp.name) |
954 | 954 |
955 def statmtimesec(st): | |
956 return int(st.st_mtime) | |
957 | |
955 # File system features | 958 # File system features |
956 | 959 |
957 def checkcase(path): | 960 def checkcase(path): |
958 """ | 961 """ |
959 Return true if the given path is on a case-sensitive filesystem | 962 Return true if the given path is on a case-sensitive filesystem |