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

login
register
mail settings
Submitter Christian Delahousse
Date Dec. 1, 2015, 7:38 p.m.
Message ID <54ae93f2d1dc72f947e8.1448998706@dev4253.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11729/
State Accepted
Headers show

Comments

Christian Delahousse - Dec. 1, 2015, 7:38 p.m.
# HG changeset patch
# User Christian Delahousse <cdelahousse@fb.com>
# Date 1448995956 28800
#      Tue Dec 01 10:52:36 2015 -0800
# Node ID 54ae93f2d1dc72f947e82326d4af8f3870f5e498
# Parent  15de5c7a6042c92f8b4a3a0c0ee265ec72ba2f5e
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
@@ -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
+