diff tests/test-completion.t @ 25652:2882d6886919

repair: add functionality to rebuild fncache Currently, there is no way to recover from a missing or corrupt fncache file in place (a clone is required). For certain use cases such as servers and with large repositories, an in-place repair may be desirable. This patch adds functionality for in-place repair of the fncache. The `hg debugrebuildfncache` command is introduced. It ensures the fncache is up to date by reconstructing the fncache from all seen files encountered during a brute force traversal of the repository's entire history. The command will add missing entries and will prune excess ones. Currently, the command no-ops unless the repository has the fncache requirement. The command could later grow the ability to "upgrade" an existing repository to be fncache enabled, if desired. When testing this patch on a local clone of the Firefox repository, it removed a bunch of entries. Investigation revealed that removed entries belonged to empty (0 byte size) .i filelogs. The functionality for pruning fncache of stripped revlogs was introduced in f49d60fa40a5, so the presence of these entries likely predates this feature.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 22 Jun 2015 09:59:48 -0700
parents 49c583ca48c4
children 84c00f03e06c
line wrap: on
line diff
--- a/tests/test-completion.t	Tue Jun 23 13:56:53 2015 -0400
+++ b/tests/test-completion.t	Mon Jun 22 09:59:48 2015 -0700
@@ -96,6 +96,7 @@
   debugpushkey
   debugpvec
   debugrebuilddirstate
+  debugrebuildfncache
   debugrename
   debugrevlog
   debugrevspec
@@ -254,6 +255,7 @@
   debugpushkey: 
   debugpvec: 
   debugrebuilddirstate: rev
+  debugrebuildfncache: 
   debugrename: rev
   debugrevlog: changelog, manifest, dir, dump
   debugrevspec: optimize