Patchwork [3,of,4] debugrebuilddirstate: added tests for --minimal flag

login
register
mail settings
Submitter Christian Delahousse
Date Nov. 12, 2015, 6:17 a.m.
Message ID <fc43737c5f8db0b48583.1447309077@dev4253.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11367/
State Superseded
Commit 25a8a866eb5d8061580e90e06b86847292ad26b5
Headers show

Comments

Christian Delahousse - Nov. 12, 2015, 6:17 a.m.
# HG changeset patch
# User Christian Delahousse <cdelahousse@fb.com>
# Date 1447283307 28800
#      Wed Nov 11 15:08:27 2015 -0800
# Node ID fc43737c5f8db0b48583bc6553960a9ea25fa3e2
# Parent  cb5481344592d2a38f1a6724324542a3d2708ec0
debugrebuilddirstate: added tests for --minimal flag

Added tests for debugrebuilddirstate --minimal.

Patch

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