281 crosschecking files in changesets and manifests |
281 crosschecking files in changesets and manifests |
282 checking files |
282 checking files |
283 1 files, 1 changesets, 1 total revisions |
283 1 files, 1 changesets, 1 total revisions |
284 $ cat .hg/store/fncache |
284 $ cat .hg/store/fncache |
285 data/y.i |
285 data/y.i |
|
286 |
|
287 $ cd .. |
|
288 |
|
289 debugrebuildfncache does nothing unless repo has fncache requirement |
|
290 |
|
291 $ hg --config format.usefncache=false init nofncache |
|
292 $ cd nofncache |
|
293 $ hg debugrebuildfncache |
|
294 (not rebuilding fncache because repository does not support fncache |
|
295 |
|
296 $ cd .. |
|
297 |
|
298 debugrebuildfncache works on empty repository |
|
299 |
|
300 $ hg init empty |
|
301 $ cd empty |
|
302 $ hg debugrebuildfncache |
|
303 fncache already up to date |
|
304 $ cd .. |
|
305 |
|
306 debugrebuildfncache on an up to date repository no-ops |
|
307 |
|
308 $ hg init repo |
|
309 $ cd repo |
|
310 $ echo initial > foo |
|
311 $ echo initial > .bar |
|
312 $ hg commit -A -m initial |
|
313 adding .bar |
|
314 adding foo |
|
315 |
|
316 $ cat .hg/store/fncache | sort |
|
317 data/.bar.i |
|
318 data/foo.i |
|
319 |
|
320 $ hg debugrebuildfncache |
|
321 fncache already up to date |
|
322 |
|
323 debugrebuildfncache restores deleted fncache file |
|
324 |
|
325 $ rm -f .hg/store/fncache |
|
326 $ hg debugrebuildfncache |
|
327 adding data/.bar.i |
|
328 adding data/foo.i |
|
329 2 items added, 0 removed from fncache |
|
330 |
|
331 $ cat .hg/store/fncache | sort |
|
332 data/.bar.i |
|
333 data/foo.i |
|
334 |
|
335 Rebuild after rebuild should no-op |
|
336 |
|
337 $ hg debugrebuildfncache |
|
338 fncache already up to date |
|
339 |
|
340 A single missing file should get restored, an extra file should be removed |
|
341 |
|
342 $ cat > .hg/store/fncache << EOF |
|
343 > data/foo.i |
|
344 > data/bad-entry.i |
|
345 > EOF |
|
346 |
|
347 $ hg debugrebuildfncache |
|
348 removing data/bad-entry.i |
|
349 adding data/.bar.i |
|
350 1 items added, 1 removed from fncache |
|
351 |
|
352 $ cat .hg/store/fncache | sort |
|
353 data/.bar.i |
|
354 data/foo.i |
|
355 |
|
356 $ cd .. |
|
357 |
|
358 Try a simple variation without dotencode to ensure fncache is ignorant of encoding |
|
359 |
|
360 $ hg --config format.dotencode=false init nodotencode |
|
361 $ cd nodotencode |
|
362 $ echo initial > foo |
|
363 $ echo initial > .bar |
|
364 $ hg commit -A -m initial |
|
365 adding .bar |
|
366 adding foo |
|
367 |
|
368 $ cat .hg/store/fncache | sort |
|
369 data/.bar.i |
|
370 data/foo.i |
|
371 |
|
372 $ rm .hg/store/fncache |
|
373 $ hg debugrebuildfncache |
|
374 adding data/.bar.i |
|
375 adding data/foo.i |
|
376 2 items added, 0 removed from fncache |
|
377 |
|
378 $ cat .hg/store/fncache | sort |
|
379 data/.bar.i |
|
380 data/foo.i |