Debian Codegraph @

tests/test-push-checkheads-multibranches-E1.t

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