|
1 ==================================== |
|
2 Testing head checking code: Case E-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 F: case involving changeset on multiple topic |
|
12 TestCase 1: moving a branch to another location |
|
13 |
|
14 .. old-state: |
|
15 .. |
|
16 .. * 1-changeset on branch default |
|
17 .. * 1-changeset on topic Z (above Y) |
|
18 .. |
|
19 .. new-state: |
|
20 .. |
|
21 .. * 1-changeset on branch default |
|
22 .. * 1-changeset on topic Z (rebased away from A0) |
|
23 .. |
|
24 .. expected-result: |
|
25 .. |
|
26 .. * push allowed |
|
27 .. |
|
28 .. graph-summary: |
|
29 .. |
|
30 .. B ø⇠◔ B' topic Z |
|
31 .. | | |
|
32 .. A ◔ | branch default |
|
33 .. |/ |
|
34 .. ● |
|
35 |
|
36 $ . $TESTDIR/testlib/topic_setup.sh |
|
37 $ . $TESTDIR/testlib/push-checkheads-util.sh |
|
38 |
|
39 Test setup |
|
40 ---------- |
|
41 |
|
42 $ mkdir E1 |
|
43 $ cd E1 |
|
44 $ setuprepos |
|
45 creating basic server and client repo |
|
46 updating to branch default |
|
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 $ cd client |
|
49 $ hg topic Z |
|
50 marked working directory as topic: Z |
|
51 $ mkcommit B0 |
|
52 active topic 'Z' grew its first changeset |
|
53 (see 'hg help topics' for more information) |
|
54 $ hg push |
|
55 pushing to $TESTTMP/E1/server |
|
56 searching for changes |
|
57 adding changesets |
|
58 adding manifests |
|
59 adding file changes |
|
60 added 1 changesets with 1 changes to 1 files |
|
61 $ hg up 0 |
|
62 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
63 $ hg topic Z |
|
64 marked working directory as topic: Z |
|
65 $ mkcommit B1 |
|
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` |
|
67 1 new obsolescence markers |
|
68 obsoleted 1 changesets |
|
69 $ hg log -G --hidden |
|
70 @ 845eeb768064 (draft)[Z]: B1 |
|
71 | |
|
72 | x 35d2f30a8ba4 (draft)[Z]: B0 |
|
73 | | |
|
74 | o 8aaa48160adc (draft): A0 |
|
75 |/ |
|
76 o 1e4be0697311 (public): root |
|
77 |
|
78 |
|
79 Actual testing |
|
80 -------------- |
|
81 |
|
82 $ hg push |
|
83 pushing to $TESTTMP/E1/server |
|
84 searching for changes |
|
85 adding changesets |
|
86 adding manifests |
|
87 adding file changes |
|
88 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
89 1 new obsolescence markers |
|
90 obsoleted 1 changesets |
|
91 |
|
92 $ cd ../.. |