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

login
register
mail settings
Submitter Christian Delahousse
Date Nov. 17, 2015, 10:54 p.m.
Message ID <7c9e5aaad4307238a8f6.1447800858@dev4253.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11441/
State Superseded
Commit 25a8a866eb5d8061580e90e06b86847292ad26b5
Headers show

Comments

Christian Delahousse - Nov. 17, 2015, 10:54 p.m.
# HG changeset patch
# User Christian Delahousse <cdelahousse@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.

Patch

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
+