Show More
@@ -15,6 +15,7 b' import cStringIO' | |||||
15 | _format = ">cllll" |
|
15 | _format = ">cllll" | |
16 | propertycache = util.propertycache |
|
16 | propertycache = util.propertycache | |
17 | filecache = scmutil.filecache |
|
17 | filecache = scmutil.filecache | |
|
18 | _rangemask = 0x7fffffff | |||
18 |
|
19 | |||
19 | class repocache(filecache): |
|
20 | class repocache(filecache): | |
20 | """filecache for files in .hg/""" |
|
21 | """filecache for files in .hg/""" | |
@@ -334,7 +335,8 b' class dirstate(object):' | |||||
334 | '''Mark a file normal and clean.''' |
|
335 | '''Mark a file normal and clean.''' | |
335 | s = os.lstat(self._join(f)) |
|
336 | s = os.lstat(self._join(f)) | |
336 | mtime = int(s.st_mtime) |
|
337 | mtime = int(s.st_mtime) | |
337 |
self._addpath(f, 'n', s.st_mode, |
|
338 | self._addpath(f, 'n', s.st_mode, | |
|
339 | s.st_size & _rangemask, mtime & _rangemask) | |||
338 | if f in self._copymap: |
|
340 | if f in self._copymap: | |
339 | del self._copymap[f] |
|
341 | del self._copymap[f] | |
340 | if mtime > self._lastnormaltime: |
|
342 | if mtime > self._lastnormaltime: | |
@@ -401,7 +403,8 b' class dirstate(object):' | |||||
401 | if self._pl[1] == nullid: |
|
403 | if self._pl[1] == nullid: | |
402 | return self.normallookup(f) |
|
404 | return self.normallookup(f) | |
403 | s = os.lstat(self._join(f)) |
|
405 | s = os.lstat(self._join(f)) | |
404 |
self._addpath(f, 'm', s.st_mode, |
|
406 | self._addpath(f, 'm', s.st_mode, | |
|
407 | s.st_size & _rangemask, int(s.st_mtime) & _rangemask) | |||
405 | if f in self._copymap: |
|
408 | if f in self._copymap: | |
406 | del self._copymap[f] |
|
409 | del self._copymap[f] | |
407 |
|
410 | |||
@@ -769,13 +772,13 b' class dirstate(object):' | |||||
769 | # means "can we check links?". |
|
772 | # means "can we check links?". | |
770 | mtime = int(st.st_mtime) |
|
773 | mtime = int(st.st_mtime) | |
771 | if (size >= 0 and |
|
774 | if (size >= 0 and | |
772 | (size != st.st_size |
|
775 | ((size != st.st_size and size != st.st_size & _rangemask) | |
773 | or ((mode ^ st.st_mode) & 0100 and self._checkexec)) |
|
776 | or ((mode ^ st.st_mode) & 0100 and self._checkexec)) | |
774 | and (mode & lnkkind != lnkkind or self._checklink) |
|
777 | and (mode & lnkkind != lnkkind or self._checklink) | |
775 | or size == -2 # other parent |
|
778 | or size == -2 # other parent | |
776 | or fn in self._copymap): |
|
779 | or fn in self._copymap): | |
777 | madd(fn) |
|
780 | madd(fn) | |
778 |
elif ( |
|
781 | elif ((time != mtime and time != mtime & _rangemask) | |
779 | and (mode & lnkkind != lnkkind or self._checklink)): |
|
782 | and (mode & lnkkind != lnkkind or self._checklink)): | |
780 | ladd(fn) |
|
783 | ladd(fn) | |
781 | elif mtime == self._lastnormaltime: |
|
784 | elif mtime == self._lastnormaltime: |
@@ -52,5 +52,15 b" Status must not set a's entry to unset (" | |||||
52 | $ hg status |
|
52 | $ hg status | |
53 | $ hg debugstate |
|
53 | $ hg debugstate | |
54 | n 644 2 2021-01-01 12:00:00 a |
|
54 | n 644 2 2021-01-01 12:00:00 a | |
55 | $ cd .. |
|
55 | ||
|
56 | Test modulo storage/comparison of absurd dates: | |||
56 |
|
57 | |||
|
58 | $ touch -t 250001011200 a | |||
|
59 | $ hg st | |||
|
60 | $ hg debugstate | |||
|
61 | n 644 2 2023-08-24 13:21:04 a | |||
|
62 | $ touch -t 195001011200 a | |||
|
63 | $ hg st | |||
|
64 | $ hg debugstate | |||
|
65 | n 644 2 2018-01-19 15:14:08 a | |||
|
66 |
General Comments 0
You need to be logged in to leave comments.
Login now