Mercurial > evolve
comparison tests/test-checkheads-superceed-A8.t @ 2255:5b33df335b6c
checkheads: add test where the rewrite of the other branch is not direct
This will help testing that our logic is properly transitive.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 31 Mar 2017 13:47:14 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2254:446ed4c21bf6 | 2255:5b33df335b6c |
---|---|
1 ==================================== | |
2 Testing head checking code: Case A-8 | |
3 ==================================== | |
4 | |
5 Mercurial checks for the introduction of multiple heads on push. Evolution | |
6 comes into play to detect if existing heads on the server are being replaced by | |
7 some of the new heads we push. | |
8 | |
9 This test file is part of a series of tests checking this behavior. | |
10 | |
11 Category A: checking simple case invoving a branch being superceeded by another. | |
12 TestCase 8: single-changeset branch indirect rewrite | |
13 | |
14 .. old-state: | |
15 .. | |
16 .. * 1 changeset branch | |
17 .. | |
18 .. new-state: | |
19 .. | |
20 .. * 1 changeset branch succeeding to A, through another unpushed changesets | |
21 .. | |
22 .. expected-result: | |
23 .. | |
24 .. * push allowed | |
25 .. | |
26 .. graph-summary: | |
27 .. | |
28 .. A' | |
29 .. A ø⇠ø⇠◔ A'' | |
30 .. |/ / | |
31 .. | / | |
32 .. |/ | |
33 .. ○ | |
34 | |
35 $ . $TESTDIR/testlib/checkheads-util.sh | |
36 | |
37 Test setup | |
38 ---------- | |
39 | |
40 $ setuprepos | |
41 creating basic server and client repo | |
42 updating to branch default | |
43 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 $ cd client | |
45 $ hg up 0 | |
46 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
47 $ mkcommit A1 | |
48 created new head | |
49 $ hg up 0 | |
50 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
51 $ mkcommit A2 | |
52 created new head | |
53 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` | |
54 $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` | |
55 $ hg log -G --hidden | |
56 @ c1f8d089020f (draft): A2 | |
57 | | |
58 | x f6082bc4ffef (draft): A1 | |
59 |/ | |
60 | x 8aaa48160adc (draft): A0 | |
61 |/ | |
62 o 1e4be0697311 (public): root | |
63 | |
64 | |
65 Actual testing | |
66 -------------- | |
67 | |
68 $ hg push | |
69 pushing to $TESTTMP/server | |
70 searching for changes | |
71 adding changesets | |
72 adding manifests | |
73 adding file changes | |
74 added 1 changesets with 1 changes to 1 files (+1 heads) | |
75 2 new obsolescence markers | |
76 | |
77 | |
78 |