| 1 |
============================================ |
| 2 |
Testing obsolescence markers push: Cases B.6 |
| 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 6: Pruned changeset with precursors not in pushed set |
| 14 |
|
| 15 |
B.6 Pruned changeset with precursors not in pushed set |
| 16 |
====================================================== |
| 17 |
|
| 18 |
.. {{{ |
| 19 |
.. B ø⇠⊗ B' |
| 20 |
.. | | |
| 21 |
.. A ○ | |
| 22 |
.. |/ |
| 23 |
.. ● O |
| 24 |
.. }}} |
| 25 |
.. |
| 26 |
.. Marker exist from: |
| 27 |
.. |
| 28 |
.. * `B ø⇠⊗ B'` |
| 29 |
.. * B' prune |
| 30 |
.. |
| 31 |
.. Command run: |
| 32 |
.. |
| 33 |
.. * hg push -r O |
| 34 |
.. |
| 35 |
.. Expected exchange: |
| 36 |
.. |
| 37 |
.. * `B ø⇠⊗ B'` |
| 38 |
.. * B' prune |
| 39 |
|
| 40 |
Setup |
| 41 |
----- |
| 42 |
|
| 43 |
$ . $TESTDIR/testlib/exchange-obsmarker-util.sh |
| 44 |
|
| 45 |
Initial |
| 46 |
|
| 47 |
$ setuprepos B.6 |
| 48 |
creating test repo for test case B.6 |
| 49 |
- pulldest |
| 50 |
- main |
| 51 |
- pushdest |
| 52 |
cd into `main` and proceed with env setup |
| 53 |
$ cd main |
| 54 |
$ mkcommit A |
| 55 |
$ mkcommit B0 |
| 56 |
$ hg up --quiet 0 |
| 57 |
$ mkcommit B1 |
| 58 |
created new head |
| 59 |
$ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` |
| 60 |
1 new obsolescence markers |
| 61 |
obsoleted 1 changesets |
| 62 |
$ hg prune -qd '0 0' . |
| 63 |
$ hg log -G --hidden |
| 64 |
x f6298a8ac3a4 (draft): B1 |
| 65 |
| |
| 66 |
| x 962ecf6b1afc (draft): B0 |
| 67 |
| | |
| 68 |
| o f5bc6836db60 (draft): A |
| 69 |
|/ |
| 70 |
@ a9bdc8b26820 (public): O |
| 71 |
|
| 72 |
$ inspect_obsmarkers |
| 73 |
obsstore content |
| 74 |
================ |
| 75 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 76 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 77 |
$ cd .. |
| 78 |
$ cd .. |
| 79 |
|
| 80 |
Actual Test |
| 81 |
------------------------------------- |
| 82 |
|
| 83 |
$ dotest B.6 O |
| 84 |
## Running testcase B.6 |
| 85 |
# testing echange of "O" (a9bdc8b26820) |
| 86 |
## initial state |
| 87 |
# obstore: main |
| 88 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 89 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 90 |
# obstore: pushdest |
| 91 |
# obstore: pulldest |
| 92 |
## pushing "O" from main to pushdest |
| 93 |
pushing to pushdest |
| 94 |
searching for changes |
| 95 |
no changes found |
| 96 |
remote: 2 new obsolescence markers |
| 97 |
## post push state |
| 98 |
# obstore: main |
| 99 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 100 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 101 |
# obstore: pushdest |
| 102 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 103 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 104 |
# obstore: pulldest |
| 105 |
## pulling "a9bdc8b26820" from main into pulldest |
| 106 |
pulling from main |
| 107 |
no changes found |
| 108 |
2 new obsolescence markers |
| 109 |
## post pull state |
| 110 |
# obstore: main |
| 111 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 112 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 113 |
# obstore: pushdest |
| 114 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 115 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 116 |
# obstore: pulldest |
| 117 |
962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 118 |
f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 119 |
|