author | Pulkit Goyal <7895pulkit@gmail.com> |
Fri, 23 Mar 2018 19:36:08 +0530 | |
changeset 3628 | 170b99a9c0b4 |
parent 2754 | 21f06d932231 |
child 2798 | 2280461343e5 |
child 4840 | 62b60fc1983d |
permissions | -rw-r--r-- |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 |
==================================== |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 |
Testing head checking code: Case B-6 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 |
==================================== |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
5 |
Mercurial checks for the introduction of new heads on push. Evolution comes |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
6 |
into play to detect if existing branches on the server are being replaced by |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
7 |
some of the new one we push. |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
9 |
This case is part of a series of tests checking this behavior. |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
11 |
Category B: simple case involving pruned changesets |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
12 |
TestCase 6: single changesets, pruned then superseeded (on a new changeset) |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
|
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 |
.. old-state: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
15 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
16 |
.. * 1 changeset branch |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
17 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 |
.. new-state: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 |
.. * old branch is rewritten onto another one, |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 |
.. * the new version is then pruned. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
22 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 |
.. expected-result: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 |
.. * push allowed |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 |
.. graph-summary: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 |
.. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 |
.. A ø⇠⊗ A' |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
30 |
.. | | |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
31 |
.. | ◔ B |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
32 |
.. |/ |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
33 |
.. ● |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
34 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
35 |
$ . $TESTDIR/testlib/push-checkheads-util.sh |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
36 |
|
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
37 |
Test setup |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
38 |
---------- |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
39 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
40 |
$ mkdir B6 |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
41 |
$ cd B6 |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
42 |
$ setuprepos |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
43 |
creating basic server and client repo |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
44 |
updating to branch default |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
46 |
$ cd client |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
47 |
$ hg up 0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
48 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
49 |
$ mkcommit B0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
50 |
created new head |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
51 |
$ mkcommit A1 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 |
$ hg up 'desc(B0)' |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
54 |
$ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
2754
21f06d932231
test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2710
diff
changeset
|
55 |
obsoleted 1 changesets |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
56 |
$ hg debugobsolete --record-parents `getid "desc(A1)"` |
2754
21f06d932231
test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2710
diff
changeset
|
57 |
obsoleted 1 changesets |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
58 |
$ hg log -G --hidden |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
59 |
x ba93660aff8d (draft): A1 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 |
| |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
61 |
@ 74ff5441d343 (draft): B0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
62 |
| |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
63 |
| x 8aaa48160adc (draft): A0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
64 |
|/ |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
65 |
o 1e4be0697311 (public): root |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
66 |
|
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 |
|
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
68 |
Actual testing |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
69 |
-------------- |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
70 |
|
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
71 |
$ hg push |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
72 |
pushing to $TESTTMP/B6/server (glob) |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
73 |
searching for changes |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
74 |
adding changesets |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
75 |
adding manifests |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
76 |
adding file changes |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
77 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
78 |
2 new obsolescence markers |
2710
e22de367fc74
compat: adapt to change in 53b3a1968aa6-core
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2277
diff
changeset
|
79 |
obsoleted 1 changesets |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
80 |
|
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
81 |
$ cd ../.. |