Mercurial > hg
annotate tests/test-push-checkheads-superceed-A7.t @ 32469:387a76cac28e stable
debian: add less as a build dependency
For builds that run on hermetic environments, it's possible that the "less"
package is not installed by default, yet it's needed for tests to pass after
revision bf5e13e38390 (which sets less as the fallback pager).
author | Rodrigo Damazio Bovendorp <rdamazio@google.com> |
---|---|
date | Fri, 26 May 2017 19:33:20 -0700 |
parents | 276390e0ccfc |
children | 53b3a1968aa6 |
rev | line source |
---|---|
31980
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 ==================================== |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 Testing head checking code: Case A-7 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 ==================================== |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
5 Mercurial checks for the introduction of new heads on push. Evolution comes |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
6 into play to detect if existing branches on the server are being replaced by |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
7 some of the new one we push. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
9 This case is part of a series of tests checking this behavior. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
11 Category A: simple case involving a branch being superceeded by another. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
12 TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 .. old-state: |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
15 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
16 .. * 2 branch (1-changeset, and 2-changesets) |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
17 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 .. new-state: |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 .. * 1 new branch superceeding the head of the old-2-changesets-branch, |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
22 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 .. expected-result: |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 .. * push allowed |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 .. graph-summary: |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 .. |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 .. B ø⇠◔ B' |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
30 .. | | |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
31 .. A'◔⇢ø | |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
32 .. | |/ |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
33 .. C ● | |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
34 .. \| |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
35 .. ● |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
36 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
37 $ . $TESTDIR/testlib/push-checkheads-util.sh |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
38 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
39 Test setup |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
40 ---------- |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
41 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
42 $ mkdir A7 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
43 $ cd A7 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
44 $ setuprepos |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 creating basic server and client repo |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
46 updating to branch default |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
48 $ cd server |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
49 $ mkcommit B0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
50 $ hg up 0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 $ mkcommit C0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 created new head |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
54 $ cd ../client |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
55 $ hg pull |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
56 pulling from $TESTTMP/A7/server (glob) |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
57 searching for changes |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
58 adding changesets |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
59 adding manifests |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 adding file changes |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
61 added 2 changesets with 2 changes to 2 files (+1 heads) |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
62 (run 'hg heads' to see heads, 'hg merge' to merge) |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
63 $ hg up 'desc(C0)' |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
64 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
65 $ mkcommit A1 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
66 $ hg up 0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
68 $ mkcommit B1 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
69 created new head |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
70 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
71 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
72 $ hg log -G --hidden |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
73 @ 25c56d33e4c4 (draft): B1 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
74 | |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
75 | o a0802eb7fc1b (draft): A1 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
76 | | |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
77 | o 0f88766e02d6 (draft): C0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
78 |/ |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
79 | x d73caddc5533 (draft): B0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
80 | | |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
81 | x 8aaa48160adc (draft): A0 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
82 |/ |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
83 o 1e4be0697311 (public): root |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
84 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
85 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
86 Actual testing |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
87 -------------- |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
88 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
89 $ hg push |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
90 pushing to $TESTTMP/A7/server (glob) |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
91 searching for changes |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
92 adding changesets |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
93 adding manifests |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
94 adding file changes |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
95 added 2 changesets with 2 changes to 2 files (+1 heads) |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
96 2 new obsolescence markers |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
97 |
276390e0ccfc
obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
98 $ cd ../.. |