| 1 |
==================================== |
| 2 |
Testing head checking code: Case D-7 |
| 3 |
==================================== |
| 4 |
|
| 5 |
Mercurial checks for the introduction of new heads on push. Evolution comes |
| 6 |
into play to detect if existing branches on the server are being replaced by |
| 7 |
some of the new one we push. |
| 8 |
|
| 9 |
This case is part of a series of tests checking this behavior. |
| 10 |
|
| 11 |
Category D: remote head is "obs-affected" locally, but result is not part of the push |
| 12 |
TestCase 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset |
| 13 |
|
| 14 |
This is a partial push variation of B6 |
| 15 |
|
| 16 |
.. old-state: |
| 17 |
.. |
| 18 |
.. * 1 changeset branch |
| 19 |
.. |
| 20 |
.. new-state: |
| 21 |
.. |
| 22 |
.. * old branch is rewritten onto another one, |
| 23 |
.. * The rewriting it again rewritten on the root |
| 24 |
.. * the new version is then pruned. |
| 25 |
.. |
| 26 |
.. expected-result: |
| 27 |
.. |
| 28 |
.. * push allowed |
| 29 |
.. |
| 30 |
.. graph-summary: |
| 31 |
.. |
| 32 |
.. A' |
| 33 |
.. A ø⇠ø⇠⊗ A'' |
| 34 |
.. | | | |
| 35 |
.. C ◔ | ◔ | B |
| 36 |
.. \|/ / |
| 37 |
.. | / |
| 38 |
.. |/ |
| 39 |
.. | |
| 40 |
.. ● |
| 41 |
|
| 42 |
$ . $TESTDIR/testlib/push-checkheads-util.sh |
| 43 |
|
| 44 |
Test setup |
| 45 |
---------- |
| 46 |
|
| 47 |
$ mkdir D7 |
| 48 |
$ cd D7 |
| 49 |
$ setuprepos |
| 50 |
creating basic server and client repo |
| 51 |
updating to branch default |
| 52 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 53 |
$ cd client |
| 54 |
$ hg up 0 |
| 55 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 56 |
$ mkcommit B0 |
| 57 |
created new head |
| 58 |
$ mkcommit A1 |
| 59 |
$ hg up '0' |
| 60 |
0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
| 61 |
$ mkcommit A2 |
| 62 |
created new head |
| 63 |
$ hg up '0' |
| 64 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 65 |
$ mkcommit C0 |
| 66 |
created new head |
| 67 |
$ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
| 68 |
1 new obsolescence markers |
| 69 |
obsoleted 1 changesets |
| 70 |
$ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"` |
| 71 |
1 new obsolescence markers |
| 72 |
obsoleted 1 changesets |
| 73 |
$ hg debugobsolete --record-parents `getid "desc(A2)"` |
| 74 |
1 new obsolescence markers |
| 75 |
obsoleted 1 changesets |
| 76 |
$ hg log -G --hidden |
| 77 |
@ 0f88766e02d6 (draft): C0 |
| 78 |
| |
| 79 |
| x c1f8d089020f (draft): A2 |
| 80 |
|/ |
| 81 |
| x ba93660aff8d (draft): A1 |
| 82 |
| | |
| 83 |
| o 74ff5441d343 (draft): B0 |
| 84 |
|/ |
| 85 |
| x 8aaa48160adc (draft): A0 |
| 86 |
|/ |
| 87 |
o 1e4be0697311 (public): root |
| 88 |
|
| 89 |
|
| 90 |
Actual testing |
| 91 |
-------------- |
| 92 |
|
| 93 |
$ hg push --rev 'desc(C0)' |
| 94 |
pushing to $TESTTMP/D7/server |
| 95 |
searching for changes |
| 96 |
adding changesets |
| 97 |
adding manifests |
| 98 |
adding file changes |
| 99 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
| 100 |
3 new obsolescence markers |
| 101 |
obsoleted 1 changesets |
| 102 |
|
| 103 |
$ cd ../.. |