Debian Codegraph @

tests/test-push-checkheads-superceed-A1.t

raw
1 ====================================
2 Testing head checking code: Case A-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 A: simple case involving a branch being superseded by another.
12 TestCase 1: single-changeset branch
13
14 .. old-state:
15 ..
16 .. * 1 changeset branch
17 ..
18 .. new-state:
19 ..
20 .. * 1 changeset branch succeeding to A
21 ..
22 .. expected-result:
23 ..
24 .. * push allowed
25 ..
26 .. graph-summary:
27 ..
28 .. A ø⇠◔ A'
29 .. |/
30 .. ●
31
32 $ . $TESTDIR/testlib/push-checkheads-util.sh
33
34 Test setup
35 ----------
36
37 $ mkdir A1
38 $ cd A1
39 $ setuprepos
40 creating basic server and client repo
41 updating to branch default
42 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 $ cd client
44 $ hg up 0
45 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
46 $ mkcommit A1
47 created new head
48 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
49 1 new obsolescence markers
50 obsoleted 1 changesets
51 $ hg log -G --hidden
52 @ f6082bc4ffef (draft): A1
53 |
54 | x 8aaa48160adc (draft): A0
55 |/
56 o 1e4be0697311 (public): root
57
58
59 Actual testing
60 --------------
61
62 $ hg push
63 pushing to $TESTTMP/A1/server
64 searching for changes
65 adding changesets
66 adding manifests
67 adding file changes
68 added 1 changesets with 1 changes to 1 files (+1 heads)
69 1 new obsolescence markers
70 obsoleted 1 changesets
71
72 $ cd ../..