Mercurial > evolve
comparison tests/test-push-checkheads-unpushed-D1.t @ 2277:61d885899466 stable
checkheads: update tests to match the one in core
These test now exists in core, so we update the evolve version.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 20 Apr 2017 12:24:43 +0200 |
parents | tests/test-checkheads-unpushed-D1.t@2b4e2e93b7db |
children | 21f06d932231 |
comparison
equal
deleted
inserted
replaced
2276:2d55ae0d6ce7 | 2277:61d885899466 |
---|---|
1 ==================================== | |
2 Testing head checking code: Case D-1 | |
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 1: remote head is rewritten, but successors is not part of the push | |
13 | |
14 .. old-state: | |
15 .. | |
16 .. * 1 changeset branch | |
17 .. | |
18 .. new-state: | |
19 .. | |
20 .. * 1 changeset branch succeeding the old branch | |
21 .. * 1 new unrelated branch | |
22 .. | |
23 .. expected-result: | |
24 .. | |
25 .. * pushing only the unrelated branch: denied | |
26 .. | |
27 .. graph-summary: | |
28 .. | |
29 .. A ø⇠○ A' | |
30 .. |/ | |
31 .. | ◔ B | |
32 .. |/ | |
33 .. ● | |
34 | |
35 $ . $TESTDIR/testlib/push-checkheads-util.sh | |
36 | |
37 Test setup | |
38 ---------- | |
39 | |
40 $ mkdir D1 | |
41 $ cd D1 | |
42 $ setuprepos | |
43 creating basic server and client repo | |
44 updating to branch default | |
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 $ cd client | |
47 $ hg up 0 | |
48 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
49 $ mkcommit A1 | |
50 created new head | |
51 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` | |
52 $ hg up 0 | |
53 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
54 $ mkcommit B0 | |
55 created new head | |
56 $ hg log -G --hidden | |
57 @ 74ff5441d343 (draft): B0 | |
58 | | |
59 | o f6082bc4ffef (draft): A1 | |
60 |/ | |
61 | x 8aaa48160adc (draft): A0 | |
62 |/ | |
63 o 1e4be0697311 (public): root | |
64 | |
65 | |
66 Actual testing | |
67 -------------- | |
68 | |
69 $ hg push -r 'desc(B0)' | |
70 pushing to $TESTTMP/D1/server (glob) | |
71 searching for changes | |
72 abort: push creates new remote head 74ff5441d343! | |
73 (merge or see 'hg help push' for details about pushing new heads) | |
74 [255] | |
75 | |
76 $ cd ../.. | |
77 |