[PATCH 4 of 4 stable] adapt existing tests to fix of diff/status -S of added/removed subrepo (issue3056)

Dov Feldstern dovdevel at gmail.com
Wed Apr 25 05:02:48 CDT 2012


# HG changeset patch
# User Dov Feldstern <dfeldstern at gmail.com>
# Date 1335346521 -10800
# Branch stable
# Node ID a31638500768576e0ab535d1de007f2592457af7
# Parent  95a579f2fd018f21e965d67bf448919cada870c5
adapt existing tests to fix of diff/status -S of added/removed subrepo (issue3056)

A few tests (more or less inadvertently) happen to test issue3056.
Until now, they were displaying incorrect behavior, from the
perspective of issue3056. Fix them to test for the correct behavior.

diff -r 95a579f2fd01 -r a31638500768 tests/test-mq-subrepo.t
--- a/tests/test-mq-subrepo.t	Wed Apr 25 12:35:21 2012 +0300
+++ b/tests/test-mq-subrepo.t	Wed Apr 25 12:35:21 2012 +0300
@@ -104,6 +104,7 @@
   [255]
   % update substate when adding .hgsub w/clean updated subrepo
   A .hgsub
+  A sub/a
   % qnew -m0 0.diff
   path sub
    source   sub
@@ -119,6 +120,7 @@
   [255]
   % update substate when modifying .hgsub w/clean updated subrepo
   M .hgsub
+  A sub2/a
   % qnew -m1 1.diff
   path sub
    source   sub
@@ -163,6 +165,7 @@
   [255]
   % update substate when adding .hgsub w/clean updated subrepo
   A .hgsub
+  A sub/a
   % qrefresh
   path sub
    source   sub
@@ -179,6 +182,7 @@
   [255]
   % update substate when modifying .hgsub w/clean updated subrepo
   M .hgsub
+  A sub2/a
   % qrefresh
   path sub
    source   sub
@@ -268,6 +272,7 @@
   [255]
   % update substate when adding .hgsub w/clean updated subrepo
   A .hgsub
+  A sub/a
   % qrecord --config ui.interactive=1 -m0 0.diff
   diff --git a/.hgsub b/.hgsub
   new file mode 100644
@@ -296,6 +301,7 @@
   [255]
   % update substate when modifying .hgsub w/clean updated subrepo
   M .hgsub
+  A sub2/a
   % qrecord --config ui.interactive=1 -m1 1.diff
   diff --git a/.hgsub b/.hgsub
   1 hunks, 1 lines changed
diff -r 95a579f2fd01 -r a31638500768 tests/test-subrepo.t
--- a/tests/test-subrepo.t	Wed Apr 25 12:35:21 2012 +0300
+++ b/tests/test-subrepo.t	Wed Apr 25 12:35:21 2012 +0300
@@ -891,6 +891,31 @@
   @@ -1,2 +0,0 @@
   -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
   -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
+  diff -r fc627a69481f -r 000000000000 s/.hgsub
+  --- a/s/.hgsub
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -ss = ss
+  diff -r fc627a69481f -r 000000000000 s/.hgsubstate
+  --- a/s/.hgsubstate
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -c7be3c1adb1112f8e167cb6b59b9b8ff342ec25d ss
+  diff -r fc627a69481f -r 000000000000 s/a
+  --- a/s/a
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -b
+  diff -r c7be3c1adb11 -r 000000000000 s/ss/a
+  --- a/s/ss/a
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -a
+  diff -r e95bcfa18a35 -r 000000000000 t/t
+  --- a/t/t
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -bah
 
 Test behavior of add for explicit path in subrepo:
   $ cd ..


More information about the Mercurial-devel mailing list