| 1 |
============================================ |
| 2 |
Testing obsolescence markers push: Cases B.5 |
| 3 |
============================================ |
| 4 |
|
| 5 |
Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of |
| 6 |
all changesets that requested to be "in sync" after the push (even if they are |
| 7 |
already on both side). |
| 8 |
|
| 9 |
This test belongs to a series of tests checking such set is properly computed |
| 10 |
and applied. This does not tests "obsmarkers" discovery capabilities. |
| 11 |
|
| 12 |
Category B: pruning case |
| 13 |
TestCase 5: Push of a children of changeset which successors is pruned |
| 14 |
|
| 15 |
B.5 Push of a children of changeset which successors is pruned |
| 16 |
============================================================== |
| 17 |
|
| 18 |
.. This case Mirror A.4, with pruned changeset successors. |
| 19 |
.. |
| 20 |
.. {{{ |
| 21 |
.. C ◔ |
| 22 |
.. | |
| 23 |
.. B⇠ø⇠⊗ B' |
| 24 |
.. | | |
| 25 |
.. A ø⇠○ A' |
| 26 |
.. |/ |
| 27 |
.. ● |
| 28 |
.. }}} |
| 29 |
.. |
| 30 |
.. Marker exist from: |
| 31 |
.. |
| 32 |
.. * `A ø⇠○ A'` |
| 33 |
.. * `B ø⇠○ B'` |
| 34 |
.. * chain from B |
| 35 |
.. * `B' is pruned` |
| 36 |
.. |
| 37 |
.. Command run: |
| 38 |
.. |
| 39 |
.. * hg push -r C |
| 40 |
.. |
| 41 |
.. Expected exchange: |
| 42 |
.. |
| 43 |
.. * chain from B |
| 44 |
.. |
| 45 |
.. Expected exclude: |
| 46 |
.. |
| 47 |
.. * `A ø⇠○ A'` |
| 48 |
.. * `B ø⇠○ B'` |
| 49 |
.. * `B' prune` |
| 50 |
|
| 51 |
Setup |
| 52 |
----- |
| 53 |
|
| 54 |
$ . $TESTDIR/testlib/exchange-obsmarker-util.sh |
| 55 |
|
| 56 |
initial |
| 57 |
|
| 58 |
$ setuprepos B.5 |
| 59 |
creating test repo for test case B.5 |
| 60 |
- pulldest |
| 61 |
- main |
| 62 |
- pushdest |
| 63 |
cd into `main` and proceed with env setup |
| 64 |
$ cd main |
| 65 |
$ mkcommit A0 |
| 66 |
$ mkcommit B0 |
| 67 |
$ mkcommit C |
| 68 |
$ hg up --quiet 0 |
| 69 |
$ mkcommit A1 |
| 70 |
created new head |
| 71 |
$ mkcommit B1 |
| 72 |
$ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'` |
| 73 |
1 new obsolescence markers |
| 74 |
obsoleted 1 changesets |
| 75 |
2 new orphan changesets |
| 76 |
$ hg debugobsolete --hidden aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(B0)'` |
| 77 |
1 new obsolescence markers |
| 78 |
$ hg debugobsolete --hidden `getid 'desc(B0)'` `getid 'desc(B1)'` |
| 79 |
1 new obsolescence markers |
| 80 |
obsoleted 1 changesets |
| 81 |
$ hg prune -qd '0 0' 'desc(B1)' |
| 82 |
$ hg log -G --hidden |
| 83 |
x 069b05c3876d (draft): B1 |
| 84 |
| |
| 85 |
@ e5ea8f9c7314 (draft): A1 |
| 86 |
| |
| 87 |
| * 1d0f3cd25300 (draft): C |
| 88 |
| | |
| 89 |
| x 6e72f0a95b5e (draft): B0 |
| 90 |
| | |
| 91 |
| x 28b51eb45704 (draft): A0 |
| 92 |
|/ |
| 93 |
o a9bdc8b26820 (public): O |
| 94 |
|
| 95 |
$ inspect_obsmarkers |
| 96 |
obsstore content |
| 97 |
================ |
| 98 |
28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 99 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 100 |
6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 101 |
069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 102 |
$ cd .. |
| 103 |
$ cd .. |
| 104 |
|
| 105 |
Actual Test (explicit push version) |
| 106 |
----------------------------------- |
| 107 |
|
| 108 |
$ dotest B.5 C -f |
| 109 |
## Running testcase B.5 |
| 110 |
# testing echange of "C" (1d0f3cd25300) |
| 111 |
## initial state |
| 112 |
# obstore: main |
| 113 |
069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 114 |
28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 115 |
6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 116 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 117 |
# obstore: pushdest |
| 118 |
# obstore: pulldest |
| 119 |
## pushing "C" from main to pushdest |
| 120 |
pushing to pushdest |
| 121 |
searching for changes |
| 122 |
remote: adding changesets |
| 123 |
remote: adding manifests |
| 124 |
remote: adding file changes |
| 125 |
remote: added 3 changesets with 3 changes to 3 files |
| 126 |
remote: 1 new obsolescence markers |
| 127 |
## post push state |
| 128 |
# obstore: main |
| 129 |
069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 130 |
28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 131 |
6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 132 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 133 |
# obstore: pushdest |
| 134 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 135 |
# obstore: pulldest |
| 136 |
## pulling "1d0f3cd25300" from main into pulldest |
| 137 |
pulling from main |
| 138 |
searching for changes |
| 139 |
adding changesets |
| 140 |
adding manifests |
| 141 |
adding file changes |
| 142 |
added 3 changesets with 3 changes to 3 files |
| 143 |
1 new obsolescence markers |
| 144 |
new changesets 28b51eb45704:1d0f3cd25300 (3 drafts) |
| 145 |
(run 'hg update' to get a working copy) |
| 146 |
## post pull state |
| 147 |
# obstore: main |
| 148 |
069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 149 |
28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 150 |
6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 151 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 152 |
# obstore: pushdest |
| 153 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 154 |
# obstore: pulldest |
| 155 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |