diff tests/test-completion.t @ 26024:84c00f03e06c

dirstate: add --minimal flag to debugrebuilddirstate On repositories with hundreds of thousands of files, hg debugrebuilddirstate causes every dirstate entry to be marked lookup, and the next hg status can take many minutes. This adds a --minimal flag that allows us to only rebuild the parts of the dirstate that are inconsistent. This follows two rules: 1) If a file is in the dirstate but not in the parent manifest, and it is not marked 'add', it is busted and we should drop it. 2) If a file is not in the dirstate at all, but it is in the parent manifest, it should be added to the dirstate and we need to mark it as lookup. This allows us to fix repositories where the dirstate doesn't match the manifest much more quickly. Tested by artificially adding bad dirstate entries (via code) for both cases above.
author Durham Goode <durham@fb.com>
date Wed, 12 Aug 2015 19:44:21 -0700
parents 2882d6886919
children 8c7d8d5e1e0f
line wrap: on
line diff
--- a/tests/test-completion.t	Thu Aug 13 22:10:52 2015 +0900
+++ b/tests/test-completion.t	Wed Aug 12 19:44:21 2015 -0700
@@ -254,7 +254,7 @@
   debugpathcomplete: full, normal, added, removed
   debugpushkey: 
   debugpvec: 
-  debugrebuilddirstate: rev
+  debugrebuilddirstate: rev, minimal
   debugrebuildfncache: 
   debugrename: rev
   debugrevlog: changelog, manifest, dir, dump