comparison tests/test-largefiles-update.t @ 48387:f838f5bca038

dirstate: stop gathering parentfiledata in update_file Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. Accurate data can still be explicitly provided. We drop the spontaneous and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11791
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 17 Nov 2021 20:27:27 +0100
parents 21733e8c924f
children 7989646f1d5a
comparison
equal deleted inserted replaced
48386:6becd5773133 48387:f838f5bca038
66 $ sleep 1 66 $ sleep 1
67 67
68 A linear merge will update standins before performing the actual merge. It will 68 A linear merge will update standins before performing the actual merge. It will
69 do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and 69 do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and
70 update the corresponding standins. 70 update the corresponding standins.
71
71 Verify that it actually marks the clean files as clean in lfdirstate so 72 Verify that it actually marks the clean files as clean in lfdirstate so
72 we don't have to hash them again next time we update. 73 we don't have to hash them again next time we update.
74
75 # note:
76 # We do this less agressively now, to avoid race condition, however the
77 # cache
78 # is properly set after the next status
79 #
80 # The "changed" output is marked as missing-correct-output/known-bad-output
81 # for clarify
73 82
74 $ hg up 83 $ hg up
75 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 updated to "f74e50bd9e55: #2" 85 updated to "f74e50bd9e55: #2"
77 1 other heads for branch "default" 86 1 other heads for branch "default"
78 $ hg debugdirstate --large --nodate 87 $ hg debugdirstate --large --nodate
88 n 644 7 set large1 (missing-correct-output !)
89 n 644 13 set large2 (missing-correct-output !)
90 n 0 -1 unset large1 (known-bad-output !)
91 n 0 -1 unset large2 (known-bad-output !)
92 $ sleep 1 # so that mtime are not ambiguous
93 $ hg status
94 $ hg debugdirstate --large --nodate
79 n 644 7 set large1 95 n 644 7 set large1
80 n 644 13 set large2 96 n 644 13 set large2
81 97
82 Test that lfdirstate keeps track of last modification of largefiles and 98 Test that lfdirstate keeps track of last modification of largefiles and
83 prevents unnecessary hashing of content - also after linear/noop update 99 prevents unnecessary hashing of content - also after linear/noop update
100
101 (XXX Since there is a possible race during update, we only do this after the next
102 status call, this is slower, but more correct)
84 103
85 $ sleep 1 104 $ sleep 1
86 $ hg st 105 $ hg st
87 $ hg debugdirstate --large --nodate 106 $ hg debugdirstate --large --nodate
88 n 644 7 set large1 107 n 644 7 set large1
89 n 644 13 set large2 108 n 644 13 set large2
90 $ hg up 109 $ hg up
91 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 110 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 updated to "f74e50bd9e55: #2" 111 updated to "f74e50bd9e55: #2"
93 1 other heads for branch "default" 112 1 other heads for branch "default"
113 $ hg debugdirstate --large --nodate
114 n 644 7 set large1 (missing-correct-output !)
115 n 644 13 set large2 (missing-correct-output !)
116 n 0 -1 unset large1 (known-bad-output !)
117 n 0 -1 unset large2 (known-bad-output !)
118 $ sleep 1 # so that mtime are not ambiguous
119 $ hg status
94 $ hg debugdirstate --large --nodate 120 $ hg debugdirstate --large --nodate
95 n 644 7 set large1 121 n 644 7 set large1
96 n 644 13 set large2 122 n 644 13 set large2
97 123
98 Test that "hg merge" updates largefiles from "other" correctly 124 Test that "hg merge" updates largefiles from "other" correctly