| 1 |
==================================== |
| 2 |
Testing head checking code: Case B-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 B: simple case involving pruned changesets |
| 12 |
TestCase 7: single changesets, pruned then superseeded (on an existing changeset) |
| 13 |
|
| 14 |
.. old-state: |
| 15 |
.. |
| 16 |
.. * 1 changeset branch |
| 17 |
.. |
| 18 |
.. new-state: |
| 19 |
.. |
| 20 |
.. * old branch is rewritten onto the common set, |
| 21 |
.. * the new version is then pruned. |
| 22 |
.. |
| 23 |
.. expected-result: |
| 24 |
.. |
| 25 |
.. * push allowed |
| 26 |
.. |
| 27 |
.. graph-summary: |
| 28 |
.. |
| 29 |
.. A ø⇠⊗ A' |
| 30 |
.. B ◔ | | |
| 31 |
.. \|/ |
| 32 |
.. ● |
| 33 |
|
| 34 |
$ . $TESTDIR/testlib/push-checkheads-util.sh |
| 35 |
|
| 36 |
Test setup |
| 37 |
---------- |
| 38 |
|
| 39 |
$ mkdir B7 |
| 40 |
$ cd B7 |
| 41 |
$ setuprepos |
| 42 |
creating basic server and client repo |
| 43 |
updating to branch default |
| 44 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 45 |
$ cd client |
| 46 |
$ hg up 0 |
| 47 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 48 |
$ mkcommit B0 |
| 49 |
created new head |
| 50 |
$ mkcommit A1 |
| 51 |
$ hg up 'desc(B0)' |
| 52 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 53 |
$ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
| 54 |
1 new obsolescence markers |
| 55 |
obsoleted 1 changesets |
| 56 |
$ hg debugobsolete --record-parents `getid "desc(A1)"` |
| 57 |
1 new obsolescence markers |
| 58 |
obsoleted 1 changesets |
| 59 |
$ hg log -G --hidden |
| 60 |
x ba93660aff8d (draft): A1 |
| 61 |
| |
| 62 |
@ 74ff5441d343 (draft): B0 |
| 63 |
| |
| 64 |
| x 8aaa48160adc (draft): A0 |
| 65 |
|/ |
| 66 |
o 1e4be0697311 (public): root |
| 67 |
|
| 68 |
|
| 69 |
Actual testing |
| 70 |
-------------- |
| 71 |
|
| 72 |
$ hg push |
| 73 |
pushing to $TESTTMP/B7/server |
| 74 |
searching for changes |
| 75 |
adding changesets |
| 76 |
adding manifests |
| 77 |
adding file changes |
| 78 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
| 79 |
2 new obsolescence markers |
| 80 |
obsoleted 1 changesets |
| 81 |
|
| 82 |
$ cd ../.. |