##// END OF EJS Templates
util: extract stub function to get mtime with second accuracy...
Yuya Nishihara -
r26492:3a0bb613 default
parent child Browse files
Show More
@@ -1690,7 +1690,7 b' class workingfilectx(committablefilectx)'
1690 1690 def date(self):
1691 1691 t, tz = self._changectx.date()
1692 1692 try:
1693 return (int(self._repo.wvfs.lstat(self._path).st_mtime), tz)
1693 return (util.statmtimesec(self._repo.wvfs.lstat(self._path)), tz)
1694 1694 except OSError as err:
1695 1695 if err.errno != errno.ENOENT:
1696 1696 raise
@@ -428,7 +428,7 b' class dirstate(object):'
428 428 def normal(self, f):
429 429 '''Mark a file normal and clean.'''
430 430 s = os.lstat(self._join(f))
431 mtime = int(s.st_mtime)
431 mtime = util.statmtimesec(s)
432 432 self._addpath(f, 'n', s.st_mode,
433 433 s.st_size & _rangemask, mtime & _rangemask)
434 434 if f in self._copymap:
@@ -998,7 +998,7 b' class dirstate(object):'
998 998 if not st and state in "nma":
999 999 dadd(fn)
1000 1000 elif state == 'n':
1001 mtime = int(st.st_mtime)
1001 mtime = util.statmtimesec(st)
1002 1002 if (size >= 0 and
1003 1003 ((size != st.st_size and size != st.st_size & _rangemask)
1004 1004 or ((mode ^ st.st_mode) & 0o100 and checkexec))
@@ -952,6 +952,9 b' def fstat(fp):'
952 952 except AttributeError:
953 953 return os.stat(fp.name)
954 954
955 def statmtimesec(st):
956 return int(st.st_mtime)
957
955 958 # File system features
956 959
957 960 def checkcase(path):
General Comments 0
You need to be logged in to leave comments. Login now