Mercurial > hg
changeset 50391:c8a91b0d1077
bundle: add test bundling changeset in the "archived" phase
Having this test highlight that phase bundling above secret is significantly
broken. Fixes coming in the next changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 08 Mar 2023 17:33:33 +0100 |
parents | d68462736492 |
children | 385a4f8056e5 |
files | tests/test-phase-archived.t |
diffstat | 1 files changed, 58 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-phase-archived.t Wed Mar 08 15:23:22 2023 +0100 +++ b/tests/test-phase-archived.t Wed Mar 08 17:33:33 2023 +0100 @@ -141,3 +141,61 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: root + +Test that a strip will preserve unrelated changeset archived +------------------------------------------------------------ + +prepare a suitable tree + + $ echo foo > bar + $ hg add bar + $ hg commit -m 'some more commit' + $ hg log -G --hidden -T '{rev} {node|short} [{phase}] {desc|firstline}\n' + @ 3 f90bf4e57854 [draft] some more commit + | + o 2 d1e73e428f29 [draft] unbundletesting + | + | o 1 883aadbbf309 [draft] unbundletesting + |/ + o 0 c1863a3840c6 [draft] root + + $ hg strip --soft --rev '.' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + saved backup bundle to $TESTTMP/repo/.hg/strip-backup/f90bf4e57854-56b37ff2-backup.hg + $ hg log -G --hidden -T '{rev} {node|short} [{phase}] {desc|firstline}\n' + o 3 f90bf4e57854 [archived] some more commit + | + @ 2 d1e73e428f29 [draft] unbundletesting + | + | o 1 883aadbbf309 [draft] unbundletesting + |/ + o 0 c1863a3840c6 [draft] root + + + +Strips the other (lower rev-num) head + + $ hg strip --rev 'min(head() and not .)' + saved backup bundle to $TESTTMP/repo/.hg/strip-backup/883aadbbf309-efc55adc-backup.hg + +The archived changeset should still be hidden + + $ hg log -G -T '{rev} {node|short} [{phase}] {desc|firstline}\n' + o 2 f90bf4e57854 [draft] some more commit (known-bad-output !) + | (known-bad-output !) + @ 1 d1e73e428f29 [draft] unbundletesting + | + o 0 c1863a3840c6 [draft] root + + +It may still be around: + + $ hg log --hidden -G -T '{rev} {node|short} [{phase}] {desc|firstline}\n' + o 2 f90bf4e57854 [draft] some more commit (known-bad-output !) + o 2 f90bf4e57854 [archived] some more commit (missing-correct-output !) + | + @ 1 d1e73e428f29 [draft] unbundletesting + | + o 0 c1863a3840c6 [draft] root + +