changeset 2421:090b5a591916

tests: add a test about strip with obshashrange enable I've seen some traceback but I cannot reproduce them. This tests seems useful anyway.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 18 May 2017 21:59:10 +0200
parents 94d1c7a1905a
children 08f487d1e032 0f101ca4b09a
files tests/test-discovery-obshashrange.t
diffstat 1 files changed, 131 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-discovery-obshashrange.t	Thu May 18 18:35:34 2017 +0200
+++ b/tests/test-discovery-obshashrange.t	Thu May 18 21:59:10 2017 +0200
@@ -569,7 +569,7 @@
              6 c8d03c1b5e94            5            1            6 446c2dc3bce5
              7 f69452c5b1af            6            1            7 000000000000
 
-Recover after data stripping
+Recover after rollback
 
   $ hg pull
   pulling from ssh://user@dummy/server
@@ -663,3 +663,133 @@
              4 bebd167eb94d            4            1            5 b21465ecb790
              6 c8d03c1b5e94            5            1            6 446c2dc3bce5
              7 f69452c5b1af            6            1            7 000000000000
+
+Recover after stripping (in the middle of the repo)
+
+We strip a branch that is not the tip of the reporiosy so part of the affected
+revision are reapplied after the target is stripped.
+
+  $ hg log -G
+  o  8 4de32a90b66c r7 tip
+  |
+  o  7 f69452c5b1af r6
+  |
+  o  6 c8d03c1b5e94 r5
+  |
+  | @  5 45f8b879de92 foo
+  |/
+  o  4 bebd167eb94d r4
+  |
+  o  3 2dc09a01254d r3
+  |
+  o  2 01241442b3c2 r2
+  |
+  o  1 66f7d451a68b r1
+  |
+  o  0 1ea73414a91b r0
+  
+  $ hg --config extensions.strip= strip -r 'desc("foo")'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  saved backup bundle to $TESTTMP/client/.hg/strip-backup/45f8b879de92-94c82517-backup.hg (glob)
+  $ hg log -G
+  o  7 4de32a90b66c r7 tip
+  |
+  o  6 f69452c5b1af r6
+  |
+  o  5 c8d03c1b5e94 r5
+  |
+  @  4 bebd167eb94d r4
+  |
+  o  3 2dc09a01254d r3
+  |
+  o  2 01241442b3c2 r2
+  |
+  o  1 66f7d451a68b r1
+  |
+  o  0 1ea73414a91b r0
+  
+  $ hg pull
+  pulling from ssh://user@dummy/server
+  searching for changes
+  OBSEXC: looking for common markers in 8 nodes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files (+1 heads)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg log -G
+  o  8 45f8b879de92 foo tip
+  |
+  | o  7 4de32a90b66c r7
+  | |
+  | o  6 f69452c5b1af r6
+  | |
+  | o  5 c8d03c1b5e94 r5
+  |/
+  @  4 bebd167eb94d r4
+  |
+  o  3 2dc09a01254d r3
+  |
+  o  2 01241442b3c2 r2
+  |
+  o  1 66f7d451a68b r1
+  |
+  o  0 1ea73414a91b r0
+  
+  $ hg blackbox
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip -r 'desc("foo")' (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> saved backup bundle to $TESTTMP/client/.hg/strip-backup/45f8b879de92-94c82517-backup.hg (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obshashrange cache reset (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (5r, 13o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obscache cache reset (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (5r, 13o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated stablerange cache in *.???? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (3r, 0o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (3r, 0o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated base branch cache in *.???? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote base branch cache with 1 labels and 1 nodes (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 3 incoming changes - new heads: 4de32a90b66c (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> --config 'extensions.strip=' strip -r 'desc("foo")' exited 0 after *.?? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G exited 0 after *.?? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated stablerange cache in *.???? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 0o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated base branch cache in *.???? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 1 incoming changes - new heads: 45f8b879de92 (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull exited 0 after *.?? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G exited 0 after *.?? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> blackbox (glob)
+  $ rm .hg/blackbox.log
+  $ hg debugobshashrange --subranges --rev 'heads(all())'
+           rev         node        index         size        depth      obshash
+             7 4de32a90b66c            0            8            8 c7f1f7e9925b
+             8 45f8b879de92            0            6            6 b8a4206b0fc6
+             3 2dc09a01254d            0            4            4 8932bf980bb4
+             7 4de32a90b66c            4            4            8 c681c3e58c27
+             3 2dc09a01254d            2            2            4 ce1937ca1278
+             8 45f8b879de92            4            2            6 31fc49d36a59
+             7 4de32a90b66c            6            2            8 033544c939f0
+             1 66f7d451a68b            0            2            2 327c7dd73d29
+             5 c8d03c1b5e94            4            2            6 89755fd39e6d
+             2 01241442b3c2            2            1            3 1ed3c61fb39a
+             0 1ea73414a91b            0            1            1 000000000000
+             3 2dc09a01254d            3            1            4 26f996446ecb
+             8 45f8b879de92            5            1            6 1a0c08180b65
+             7 4de32a90b66c            7            1            8 033544c939f0
+             1 66f7d451a68b            1            1            2 327c7dd73d29
+             4 bebd167eb94d            4            1            5 b21465ecb790
+             5 c8d03c1b5e94            5            1            6 446c2dc3bce5
+             6 f69452c5b1af            6            1            7 000000000000
+