[PATCH 3 of 5 V2] debugrebuilddirstate: added tests for --minimal flag

cdelahousse at fb.com cdelahousse at fb.com
Tue Nov 17 16:54:18 CST 2015


# HG changeset patch
# User Christian Delahousse <cdelahousse at fb.com>
# Date 1447283307 28800
#      Wed Nov 11 15:08:27 2015 -0800
# Node ID 7c9e5aaad4307238a8f6abca9038dd3e4cea9534
# Parent  7e9f321545b481302597ecdc90e34b62b0b8e54c
debugrebuilddirstate: added tests for --minimal flag

Added tests for debugrebuilddirstate --minimal.

diff --git a/tests/test-rebuildstate.t b/tests/test-rebuildstate.t
--- a/tests/test-rebuildstate.t
+++ b/tests/test-rebuildstate.t
@@ -40,4 +40,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 debugdirstate --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 debugdirstate --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
+


More information about the Mercurial-devel mailing list