| 1 |
============================================ |
| 2 |
Testing obsolescence markers push: Cases B.4 |
| 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 4: Pruned changeset on common part of the history |
| 14 |
Variants: |
| 15 |
# a: explicite push |
| 16 |
# b: bare push |
| 17 |
|
| 18 |
B.4 Pruned changeset on common part of history |
| 19 |
============================================= |
| 20 |
|
| 21 |
.. {{{ |
| 22 |
.. ⊗ C |
| 23 |
.. | ● B |
| 24 |
.. | | |
| 25 |
.. | ● A |
| 26 |
.. |/ |
| 27 |
.. ● O |
| 28 |
.. }}} |
| 29 |
.. |
| 30 |
.. Marker exist from: |
| 31 |
.. |
| 32 |
.. * C (prune) |
| 33 |
.. |
| 34 |
.. Command run: |
| 35 |
.. |
| 36 |
.. * hg push -r B |
| 37 |
.. * hg push |
| 38 |
.. |
| 39 |
.. Expected exchange: |
| 40 |
.. |
| 41 |
.. * prune for C |
| 42 |
|
| 43 |
Setup |
| 44 |
----- |
| 45 |
|
| 46 |
$ . $TESTDIR/testlib/exchange-obsmarker-util.sh |
| 47 |
|
| 48 |
initial |
| 49 |
|
| 50 |
$ setuprepos B.4 |
| 51 |
creating test repo for test case B.4 |
| 52 |
- pulldest |
| 53 |
- main |
| 54 |
- pushdest |
| 55 |
cd into `main` and proceed with env setup |
| 56 |
$ cd main |
| 57 |
$ mkcommit A |
| 58 |
$ mkcommit B |
| 59 |
$ hg phase --public . |
| 60 |
$ hg push ../pushdest |
| 61 |
pushing to ../pushdest |
| 62 |
searching for changes |
| 63 |
remote: adding changesets |
| 64 |
remote: adding manifests |
| 65 |
remote: adding file changes |
| 66 |
remote: added 2 changesets with 2 changes to 2 files |
| 67 |
$ hg push ../pulldest |
| 68 |
pushing to ../pulldest |
| 69 |
searching for changes |
| 70 |
remote: adding changesets |
| 71 |
remote: adding manifests |
| 72 |
remote: adding file changes |
| 73 |
remote: added 2 changesets with 2 changes to 2 files |
| 74 |
$ hg update -q 0 |
| 75 |
$ mkcommit C |
| 76 |
created new head |
| 77 |
$ hg prune -qd '0 0' . |
| 78 |
$ hg log -G --hidden |
| 79 |
x 7f7f229b13a6 (draft): C |
| 80 |
| |
| 81 |
| o f6fbb35d8ac9 (public): B |
| 82 |
| | |
| 83 |
| o f5bc6836db60 (public): A |
| 84 |
|/ |
| 85 |
@ a9bdc8b26820 (public): O |
| 86 |
|
| 87 |
$ inspect_obsmarkers |
| 88 |
obsstore content |
| 89 |
================ |
| 90 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 91 |
$ cd .. |
| 92 |
$ cd .. |
| 93 |
|
| 94 |
$ cp -R B.4 B.4.a |
| 95 |
$ cp -R B.4 B.4.b |
| 96 |
|
| 97 |
Actual Test (explicit push version) |
| 98 |
----------------------------------- |
| 99 |
|
| 100 |
$ dotest B.4.a O |
| 101 |
## Running testcase B.4.a |
| 102 |
# testing echange of "O" (a9bdc8b26820) |
| 103 |
## initial state |
| 104 |
# obstore: main |
| 105 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 106 |
# obstore: pushdest |
| 107 |
# obstore: pulldest |
| 108 |
## pushing "O" from main to pushdest |
| 109 |
pushing to pushdest |
| 110 |
searching for changes |
| 111 |
no changes found |
| 112 |
remote: 1 new obsolescence markers |
| 113 |
## post push state |
| 114 |
# obstore: main |
| 115 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 116 |
# obstore: pushdest |
| 117 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 118 |
# obstore: pulldest |
| 119 |
## pulling "a9bdc8b26820" from main into pulldest |
| 120 |
pulling from main |
| 121 |
no changes found |
| 122 |
1 new obsolescence markers |
| 123 |
## post pull state |
| 124 |
# obstore: main |
| 125 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 126 |
# obstore: pushdest |
| 127 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 128 |
# obstore: pulldest |
| 129 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 130 |
|
| 131 |
Actual Test (bare push version) |
| 132 |
----------------------------------- |
| 133 |
|
| 134 |
$ dotest B.4.b |
| 135 |
## Running testcase B.4.b |
| 136 |
## initial state |
| 137 |
# obstore: main |
| 138 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 139 |
# obstore: pushdest |
| 140 |
# obstore: pulldest |
| 141 |
## pushing from main to pushdest |
| 142 |
pushing to pushdest |
| 143 |
searching for changes |
| 144 |
no changes found |
| 145 |
remote: 1 new obsolescence markers |
| 146 |
## post push state |
| 147 |
# obstore: main |
| 148 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 149 |
# obstore: pushdest |
| 150 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 151 |
# obstore: pulldest |
| 152 |
## pulling from main into pulldest |
| 153 |
pulling from main |
| 154 |
searching for changes |
| 155 |
no changes found |
| 156 |
1 new obsolescence markers |
| 157 |
## post pull state |
| 158 |
# obstore: main |
| 159 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 160 |
# obstore: pushdest |
| 161 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
| 162 |
# obstore: pulldest |
| 163 |
7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |