tests/test-issue6528.t
branchstable
changeset 47821 c30ca163b45e
parent 47817 855463b5fe49
child 47822 2813d406b036
--- a/tests/test-issue6528.t	Sat Aug 07 14:13:53 2021 +0200
+++ b/tests/test-issue6528.t	Sat Aug 07 14:12:28 2021 +0200
@@ -431,3 +431,96 @@
   $ hg debug-repair-issue6528
   no affected revisions were found
   $ hg st
+
+  $ cd ..
+
+Applying a bad bundle should fix it on the fly
+----------------------------------------------
+
+from a v1 bundle
+~~~~~~~~~~~~~~~~
+
+  $ hg debugbundle  --spec "$TESTDIR"/bundles/issue6528.hg-v1
+  bzip2-v1
+
+  $ hg init unbundle-v1
+  $ cd unbundle-v1
+
+  $ hg unbundle "$TESTDIR"/bundles/issue6528.hg-v1
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 12 changes to 4 files
+  new changesets f5a5a568022f:3beabb508514 (8 drafts)
+  (run 'hg update' to get a working copy)
+
+Check that revision were fixed on the fly
+
+  $ hg debugrevlogindex b.txt
+     rev linkrev nodeid       p1           p2
+       0       2 05b806ebe5ea 000000000000 000000000000
+       1       3 a58b36ad6b65 000000000000 05b806ebe5ea
+       2       6 216a5fe8b8ed 000000000000 000000000000
+       3       7 ea4f2f2463cc 000000000000 216a5fe8b8ed
+
+  $ hg debugrevlogindex D.txt
+     rev linkrev nodeid       p1           p2
+       0       6 2a8d3833f2fb 000000000000 000000000000
+       1       7 2a80419dfc31 000000000000 2a8d3833f2fb
+
+That we don't see the symptoms of the bug
+
+  $ hg up -- -1
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg status
+
+And that the repair command does not find anything to fix
+
+  $ hg debug-repair-issue6528
+  no affected revisions were found
+
+  $ cd ..
+
+from a v2 bundle
+~~~~~~~~~~~~~~~~
+
+  $ hg debugbundle --spec "$TESTDIR"/bundles/issue6528.hg-v2
+  bzip2-v2
+
+  $ hg init unbundle-v2
+  $ cd unbundle-v2
+
+  $ hg unbundle "$TESTDIR"/bundles/issue6528.hg-v2
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 12 changes to 4 files
+  new changesets f5a5a568022f:3beabb508514 (8 drafts)
+  (run 'hg update' to get a working copy)
+
+Check that revision were fixed on the fly
+
+  $ hg debugrevlogindex b.txt
+     rev linkrev nodeid       p1           p2
+       0       2 05b806ebe5ea 000000000000 000000000000
+       1       3 a58b36ad6b65 000000000000 05b806ebe5ea
+       2       6 216a5fe8b8ed 000000000000 000000000000
+       3       7 ea4f2f2463cc 000000000000 216a5fe8b8ed
+
+  $ hg debugrevlogindex D.txt
+     rev linkrev nodeid       p1           p2
+       0       6 2a8d3833f2fb 000000000000 000000000000
+       1       7 2a80419dfc31 000000000000 2a8d3833f2fb
+
+That we don't see the symptoms of the bug
+
+  $ hg up -- -1
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg status
+
+And that the repair command does not find anything to fix
+
+  $ hg debug-repair-issue6528
+  no affected revisions were found
+
+  $ cd ..