changeset 27175:25a8a866eb5d

debugrebuilddirstate: added tests for --minimal flag Added tests for debugrebuilddirstate --minimal.
author Christian Delahousse <cdelahousse@fb.com>
date Tue, 01 Dec 2015 10:52:36 -0800
parents 9fbe3545e4bd
children 54ace3372f84
files tests/test-rebuildstate.t
diffstat 1 files changed, 56 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebuildstate.t	Tue Dec 01 11:17:14 2015 -0800
+++ b/tests/test-rebuildstate.t	Tue Dec 01 10:52:36 2015 -0800
@@ -67,4 +67,59 @@
   ? baz
   C foo
 
-  $ cd ..
+Test debugdirstate --minimal where a file is not in parent manifest
+but in the dirstate
+  $ touch foo bar qux
+  $ hg add qux
+  $ hg remove bar
+  $ hg status -A
+  A qux
+  R bar
+  ? baz
+  C foo
+  $ hg debugadddrop --normal-lookup baz
+  $ hg debugdirstate --nodates
+  r   0          0 * bar (glob)
+  n   0         -1 * baz (glob)
+  n 644          0 * foo (glob)
+  a   0         -1 * qux (glob)
+  $ hg debugrebuilddirstate --minimal
+  $ hg debugdirstate --nodates
+  r   0          0 * bar (glob)
+  n 644          0 * foo (glob)
+  a   0         -1 * qux (glob)
+  $ hg status -A
+  A qux
+  R bar
+  ? baz
+  C foo
+
+Test debugdirstate --minimal where file is in the parent manifest but not the
+dirstate
+  $ hg manifest
+  bar
+  foo
+  $ hg status -A
+  A qux
+  R bar
+  ? baz
+  C foo
+  $ hg debugdirstate --nodates
+  r   0          0 * bar (glob)
+  n 644          0 * foo (glob)
+  a   0         -1 * qux (glob)
+  $ hg debugadddrop --drop foo
+  $ hg debugdirstate --nodates
+  r   0          0 * bar (glob)
+  a   0         -1 * qux (glob)
+  $ hg debugrebuilddirstate --minimal
+  $ hg debugdirstate --nodates
+  r   0          0 * bar (glob)
+  n   0         -1 * foo (glob)
+  a   0         -1 * qux (glob)
+  $ hg status -A
+  A qux
+  R bar
+  ? baz
+  C foo
+