Show More
@@ -15,6 +15,7 b' import cStringIO' | |||
|
15 | 15 | _format = ">cllll" |
|
16 | 16 | propertycache = util.propertycache |
|
17 | 17 | filecache = scmutil.filecache |
|
18 | _rangemask = 0x7fffffff | |
|
18 | 19 | |
|
19 | 20 | class repocache(filecache): |
|
20 | 21 | """filecache for files in .hg/""" |
@@ -334,7 +335,8 b' class dirstate(object):' | |||
|
334 | 335 | '''Mark a file normal and clean.''' |
|
335 | 336 | s = os.lstat(self._join(f)) |
|
336 | 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 | 340 | if f in self._copymap: |
|
339 | 341 | del self._copymap[f] |
|
340 | 342 | if mtime > self._lastnormaltime: |
@@ -401,7 +403,8 b' class dirstate(object):' | |||
|
401 | 403 | if self._pl[1] == nullid: |
|
402 | 404 | return self.normallookup(f) |
|
403 | 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 | 408 | if f in self._copymap: |
|
406 | 409 | del self._copymap[f] |
|
407 | 410 | |
@@ -769,13 +772,13 b' class dirstate(object):' | |||
|
769 | 772 | # means "can we check links?". |
|
770 | 773 | mtime = int(st.st_mtime) |
|
771 | 774 | if (size >= 0 and |
|
772 | (size != st.st_size | |
|
775 | ((size != st.st_size and size != st.st_size & _rangemask) | |
|
773 | 776 | or ((mode ^ st.st_mode) & 0100 and self._checkexec)) |
|
774 | 777 | and (mode & lnkkind != lnkkind or self._checklink) |
|
775 | 778 | or size == -2 # other parent |
|
776 | 779 | or fn in self._copymap): |
|
777 | 780 | madd(fn) |
|
778 |
elif ( |
|
|
781 | elif ((time != mtime and time != mtime & _rangemask) | |
|
779 | 782 | and (mode & lnkkind != lnkkind or self._checklink)): |
|
780 | 783 | ladd(fn) |
|
781 | 784 | elif mtime == self._lastnormaltime: |
@@ -52,5 +52,15 b" Status must not set a's entry to unset (" | |||
|
52 | 52 | $ hg status |
|
53 | 53 | $ hg debugstate |
|
54 | 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