comparison tests/test-issue6528.t @ 48546:e91aa800ae5b

rhg: desambiguate status without decompressing filelog if possible When status is unsure based on `stat()` and the dirstate if a file is clean or modified, we need to compare it against the filelog. This comparison can skip looking at contents if the lengths differ. This changeset optimize this further to deduce what we can about the length if the filelog without decompressing it or resolving deltas. Differential Revision: https://phab.mercurial-scm.org/D11965
author Simon Sapin <simon.sapin@octobus.net>
date Fri, 07 Jan 2022 14:40:21 +0100
parents 3eb3aef6d3bf
children b10e4c19f8c5
comparison
equal deleted inserted replaced
48545:5026a0d37526 48546:e91aa800ae5b
191 to resolve ambiguous files at the end of status without reading their content 191 to resolve ambiguous files at the end of status without reading their content
192 if the size differs, and reading the expected size without resolving filelog 192 if the size differs, and reading the expected size without resolving filelog
193 deltas where possible.) 193 deltas where possible.)
194 194
195 $ hg st 195 $ hg st
196 M D.txt (no-rhg !) 196 M D.txt
197 M b.txt (no-rhg !) 197 M b.txt
198 $ hg debugrevlogindex b.txt 198 $ hg debugrevlogindex b.txt
199 rev linkrev nodeid p1 p2 199 rev linkrev nodeid p1 p2
200 0 2 05b806ebe5ea 000000000000 000000000000 200 0 2 05b806ebe5ea 000000000000 000000000000
201 1 3 a58b36ad6b65 05b806ebe5ea 000000000000 201 1 3 a58b36ad6b65 05b806ebe5ea 000000000000
202 2 6 216a5fe8b8ed 000000000000 000000000000 202 2 6 216a5fe8b8ed 000000000000 000000000000
210 $ hg debug-repair-issue6528 --dry-run 210 $ hg debug-repair-issue6528 --dry-run
211 found affected revision 1 for filelog 'data/D.txt.i' 211 found affected revision 1 for filelog 'data/D.txt.i'
212 found affected revision 1 for filelog 'data/b.txt.i' 212 found affected revision 1 for filelog 'data/b.txt.i'
213 found affected revision 3 for filelog 'data/b.txt.i' 213 found affected revision 3 for filelog 'data/b.txt.i'
214 $ hg st 214 $ hg st
215 M D.txt (no-rhg !) 215 M D.txt
216 M b.txt (no-rhg !) 216 M b.txt
217 $ hg debugrevlogindex b.txt 217 $ hg debugrevlogindex b.txt
218 rev linkrev nodeid p1 p2 218 rev linkrev nodeid p1 p2
219 0 2 05b806ebe5ea 000000000000 000000000000 219 0 2 05b806ebe5ea 000000000000 000000000000
220 1 3 a58b36ad6b65 05b806ebe5ea 000000000000 220 1 3 a58b36ad6b65 05b806ebe5ea 000000000000
221 2 6 216a5fe8b8ed 000000000000 000000000000 221 2 6 216a5fe8b8ed 000000000000 000000000000
229 $ hg debug-repair-issue6528 --dry-run --paranoid 229 $ hg debug-repair-issue6528 --dry-run --paranoid
230 found affected revision 1 for filelog 'data/D.txt.i' 230 found affected revision 1 for filelog 'data/D.txt.i'
231 found affected revision 1 for filelog 'data/b.txt.i' 231 found affected revision 1 for filelog 'data/b.txt.i'
232 found affected revision 3 for filelog 'data/b.txt.i' 232 found affected revision 3 for filelog 'data/b.txt.i'
233 $ hg st 233 $ hg st
234 M D.txt (no-rhg !) 234 M D.txt
235 M b.txt (no-rhg !) 235 M b.txt
236 $ hg debugrevlogindex b.txt 236 $ hg debugrevlogindex b.txt
237 rev linkrev nodeid p1 p2 237 rev linkrev nodeid p1 p2
238 0 2 05b806ebe5ea 000000000000 000000000000 238 0 2 05b806ebe5ea 000000000000 000000000000
239 1 3 a58b36ad6b65 05b806ebe5ea 000000000000 239 1 3 a58b36ad6b65 05b806ebe5ea 000000000000
240 2 6 216a5fe8b8ed 000000000000 000000000000 240 2 6 216a5fe8b8ed 000000000000 000000000000
306 loading report file '$TESTTMP/report.txt' 306 loading report file '$TESTTMP/report.txt'
307 found affected revision 1 for filelog 'D.txt' 307 found affected revision 1 for filelog 'D.txt'
308 found affected revision 1 for filelog 'b.txt' 308 found affected revision 1 for filelog 'b.txt'
309 found affected revision 3 for filelog 'b.txt' 309 found affected revision 3 for filelog 'b.txt'
310 $ hg st 310 $ hg st
311 M D.txt (no-rhg !) 311 M D.txt
312 M b.txt (no-rhg !) 312 M b.txt
313 $ hg debugrevlogindex b.txt 313 $ hg debugrevlogindex b.txt
314 rev linkrev nodeid p1 p2 314 rev linkrev nodeid p1 p2
315 0 2 05b806ebe5ea 000000000000 000000000000 315 0 2 05b806ebe5ea 000000000000 000000000000
316 1 3 a58b36ad6b65 05b806ebe5ea 000000000000 316 1 3 a58b36ad6b65 05b806ebe5ea 000000000000
317 2 6 216a5fe8b8ed 000000000000 000000000000 317 2 6 216a5fe8b8ed 000000000000 000000000000