##// END OF EJS Templates
tests: fix misspelling of supersede...
av6 -
r50061:5996640f default
parent child Browse files
Show More
@@ -1,85 +1,85 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case C-2
2 Testing head checking code: Case C-2
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category C: checking case were the branch is only partially obsoleted.
11 Category C: checking case were the branch is only partially obsoleted.
12 TestCase 1: 2 changeset branch, only the head is rewritten
12 TestCase 1: 2 changeset branch, only the head is rewritten
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 changeset branch
16 .. * 2 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 new changesets branches superceeding only the head of the old one
20 .. * 1 new changesets branches superseding only the head of the old one
21 .. * base of the old branch is still alive
21 .. * base of the old branch is still alive
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push denied
25 .. * push denied
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B ΓΈβ‡ β—” B'
29 .. B ΓΈβ‡ β—” B'
30 .. | |
30 .. | |
31 .. A β—‹ |
31 .. A β—‹ |
32 .. |/
32 .. |/
33 .. β—‹
33 .. β—‹
34
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
36
37 Test setup
37 Test setup
38 ----------
38 ----------
39
39
40 $ mkdir C1
40 $ mkdir C1
41 $ cd C1
41 $ cd C1
42 $ setuprepos
42 $ setuprepos
43 creating basic server and client repo
43 creating basic server and client repo
44 updating to branch default
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd server
46 $ cd server
47 $ mkcommit B0
47 $ mkcommit B0
48 $ cd ../client
48 $ cd ../client
49 $ hg pull
49 $ hg pull
50 pulling from $TESTTMP/C1/server
50 pulling from $TESTTMP/C1/server
51 searching for changes
51 searching for changes
52 adding changesets
52 adding changesets
53 adding manifests
53 adding manifests
54 adding file changes
54 adding file changes
55 added 1 changesets with 1 changes to 1 files
55 added 1 changesets with 1 changes to 1 files
56 new changesets d73caddc5533 (1 drafts)
56 new changesets d73caddc5533 (1 drafts)
57 (run 'hg update' to get a working copy)
57 (run 'hg update' to get a working copy)
58 $ hg up 0
58 $ hg up 0
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 $ mkcommit B1
60 $ mkcommit B1
61 created new head
61 created new head
62 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
62 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
63 1 new obsolescence markers
63 1 new obsolescence markers
64 obsoleted 1 changesets
64 obsoleted 1 changesets
65 $ hg log -G --hidden
65 $ hg log -G --hidden
66 @ 25c56d33e4c4 (draft): B1
66 @ 25c56d33e4c4 (draft): B1
67 |
67 |
68 | x d73caddc5533 (draft): B0
68 | x d73caddc5533 (draft): B0
69 | |
69 | |
70 | o 8aaa48160adc (draft): A0
70 | o 8aaa48160adc (draft): A0
71 |/
71 |/
72 o 1e4be0697311 (public): root
72 o 1e4be0697311 (public): root
73
73
74
74
75 Actual testing
75 Actual testing
76 --------------
76 --------------
77
77
78 $ hg push
78 $ hg push
79 pushing to $TESTTMP/C1/server
79 pushing to $TESTTMP/C1/server
80 searching for changes
80 searching for changes
81 abort: push creates new remote head 25c56d33e4c4
81 abort: push creates new remote head 25c56d33e4c4
82 (merge or see 'hg help push' for details about pushing new heads)
82 (merge or see 'hg help push' for details about pushing new heads)
83 [20]
83 [20]
84
84
85 $ cd ../..
85 $ cd ../..
@@ -1,86 +1,86 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case C-2
2 Testing head checking code: Case C-2
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category C: case were the branch is only partially obsoleted
11 Category C: case were the branch is only partially obsoleted
12 TestCase 2: 2 changeset branch, only the base is rewritten
12 TestCase 2: 2 changeset branch, only the base is rewritten
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 changeset branch
16 .. * 2 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 new changesets branches superceeding only the base of the old one
20 .. * 1 new changesets branches superseding only the base of the old one
21 .. * The old branch is still alive (base is obsolete, head is alive)
21 .. * The old branch is still alive (base is obsolete, head is alive)
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push denied
25 .. * push denied
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B β—‹
29 .. B β—‹
30 .. |
30 .. |
31 .. A ΓΈβ‡ β—” A'
31 .. A ΓΈβ‡ β—” A'
32 .. |/
32 .. |/
33 .. ●
33 .. ●
34
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
36
37 Test setup
37 Test setup
38 ----------
38 ----------
39
39
40 $ mkdir C2
40 $ mkdir C2
41 $ cd C2
41 $ cd C2
42 $ setuprepos
42 $ setuprepos
43 creating basic server and client repo
43 creating basic server and client repo
44 updating to branch default
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd server
46 $ cd server
47 $ mkcommit B0
47 $ mkcommit B0
48 $ cd ../client
48 $ cd ../client
49 $ hg pull
49 $ hg pull
50 pulling from $TESTTMP/C2/server
50 pulling from $TESTTMP/C2/server
51 searching for changes
51 searching for changes
52 adding changesets
52 adding changesets
53 adding manifests
53 adding manifests
54 adding file changes
54 adding file changes
55 added 1 changesets with 1 changes to 1 files
55 added 1 changesets with 1 changes to 1 files
56 new changesets d73caddc5533 (1 drafts)
56 new changesets d73caddc5533 (1 drafts)
57 (run 'hg update' to get a working copy)
57 (run 'hg update' to get a working copy)
58 $ hg up 0
58 $ hg up 0
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 $ mkcommit A1
60 $ mkcommit A1
61 created new head
61 created new head
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
63 1 new obsolescence markers
63 1 new obsolescence markers
64 obsoleted 1 changesets
64 obsoleted 1 changesets
65 1 new orphan changesets
65 1 new orphan changesets
66 $ hg log -G --hidden
66 $ hg log -G --hidden
67 @ f6082bc4ffef (draft): A1
67 @ f6082bc4ffef (draft): A1
68 |
68 |
69 | * d73caddc5533 (draft): B0
69 | * d73caddc5533 (draft): B0
70 | |
70 | |
71 | x 8aaa48160adc (draft): A0
71 | x 8aaa48160adc (draft): A0
72 |/
72 |/
73 o 1e4be0697311 (public): root
73 o 1e4be0697311 (public): root
74
74
75
75
76 Actual testing
76 Actual testing
77 --------------
77 --------------
78
78
79 $ hg push --rev 'desc(A1)'
79 $ hg push --rev 'desc(A1)'
80 pushing to $TESTTMP/C2/server
80 pushing to $TESTTMP/C2/server
81 searching for changes
81 searching for changes
82 abort: push creates new remote head f6082bc4ffef
82 abort: push creates new remote head f6082bc4ffef
83 (merge or see 'hg help push' for details about pushing new heads)
83 (merge or see 'hg help push' for details about pushing new heads)
84 [20]
84 [20]
85
85
86 $ cd ../..
86 $ cd ../..
@@ -1,92 +1,92 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case B-2
2 Testing head checking code: Case B-2
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category B: simple case involving pruned changesets
11 Category B: simple case involving pruned changesets
12 TestCase 2: multi-changeset branch, head is pruned, rest is superceeded
12 TestCase 2: multi-changeset branch, head is pruned, rest is superseded
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 changeset branch
16 .. * 2 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * old head is pruned
20 .. * old head is pruned
21 .. * 1 new branch succeeding to the other changeset in the old branch
21 .. * 1 new branch succeeding to the other changeset in the old branch
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push allowed
25 .. * push allowed
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B βŠ—
29 .. B βŠ—
30 .. |
30 .. |
31 .. A ΓΈβ‡ β—” A'
31 .. A ΓΈβ‡ β—” A'
32 .. |/
32 .. |/
33 .. ●
33 .. ●
34
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
36
37 Test setup
37 Test setup
38 ----------
38 ----------
39
39
40 $ mkdir B2
40 $ mkdir B2
41 $ cd B2
41 $ cd B2
42 $ setuprepos
42 $ setuprepos
43 creating basic server and client repo
43 creating basic server and client repo
44 updating to branch default
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd server
46 $ cd server
47 $ mkcommit B0
47 $ mkcommit B0
48 $ cd ../client
48 $ cd ../client
49 $ hg pull
49 $ hg pull
50 pulling from $TESTTMP/B2/server
50 pulling from $TESTTMP/B2/server
51 searching for changes
51 searching for changes
52 adding changesets
52 adding changesets
53 adding manifests
53 adding manifests
54 adding file changes
54 adding file changes
55 added 1 changesets with 1 changes to 1 files
55 added 1 changesets with 1 changes to 1 files
56 new changesets d73caddc5533 (1 drafts)
56 new changesets d73caddc5533 (1 drafts)
57 (run 'hg update' to get a working copy)
57 (run 'hg update' to get a working copy)
58 $ hg up 0
58 $ hg up 0
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 $ mkcommit A1
60 $ mkcommit A1
61 created new head
61 created new head
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
63 1 new obsolescence markers
63 1 new obsolescence markers
64 obsoleted 1 changesets
64 obsoleted 1 changesets
65 1 new orphan changesets
65 1 new orphan changesets
66 $ hg debugobsolete --record-parents `getid "desc(B0)"`
66 $ hg debugobsolete --record-parents `getid "desc(B0)"`
67 1 new obsolescence markers
67 1 new obsolescence markers
68 obsoleted 1 changesets
68 obsoleted 1 changesets
69 $ hg log -G --hidden
69 $ hg log -G --hidden
70 @ f6082bc4ffef (draft): A1
70 @ f6082bc4ffef (draft): A1
71 |
71 |
72 | x d73caddc5533 (draft): B0
72 | x d73caddc5533 (draft): B0
73 | |
73 | |
74 | x 8aaa48160adc (draft): A0
74 | x 8aaa48160adc (draft): A0
75 |/
75 |/
76 o 1e4be0697311 (public): root
76 o 1e4be0697311 (public): root
77
77
78
78
79 Actual testing
79 Actual testing
80 --------------
80 --------------
81
81
82 $ hg push
82 $ hg push
83 pushing to $TESTTMP/B2/server
83 pushing to $TESTTMP/B2/server
84 searching for changes
84 searching for changes
85 adding changesets
85 adding changesets
86 adding manifests
86 adding manifests
87 adding file changes
87 adding file changes
88 added 1 changesets with 1 changes to 1 files (+1 heads)
88 added 1 changesets with 1 changes to 1 files (+1 heads)
89 2 new obsolescence markers
89 2 new obsolescence markers
90 obsoleted 2 changesets
90 obsoleted 2 changesets
91
91
92 $ cd ../..
92 $ cd ../..
@@ -1,93 +1,93 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case B-3
2 Testing head checking code: Case B-3
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category B: simple case involving pruned changesets
11 Category B: simple case involving pruned changesets
12 TestCase 3: multi-changeset branch, other is pruned, rest is superceeded
12 TestCase 3: multi-changeset branch, other is pruned, rest is superseded
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 changeset branch
16 .. * 2 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * old head is superceeded
20 .. * old head is superseded
21 .. * old other is pruned
21 .. * old other is pruned
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push allowed
25 .. * push allowed
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B ΓΈβ‡ β—” B'
29 .. B ΓΈβ‡ β—” B'
30 .. | |
30 .. | |
31 .. A βŠ— |
31 .. A βŠ— |
32 .. |/
32 .. |/
33 .. ●
33 .. ●
34
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
36
37 Test setup
37 Test setup
38 ----------
38 ----------
39
39
40 $ mkdir B3
40 $ mkdir B3
41 $ cd B3
41 $ cd B3
42 $ setuprepos
42 $ setuprepos
43 creating basic server and client repo
43 creating basic server and client repo
44 updating to branch default
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd server
46 $ cd server
47 $ mkcommit B0
47 $ mkcommit B0
48 $ cd ../client
48 $ cd ../client
49 $ hg pull
49 $ hg pull
50 pulling from $TESTTMP/B3/server
50 pulling from $TESTTMP/B3/server
51 searching for changes
51 searching for changes
52 adding changesets
52 adding changesets
53 adding manifests
53 adding manifests
54 adding file changes
54 adding file changes
55 added 1 changesets with 1 changes to 1 files
55 added 1 changesets with 1 changes to 1 files
56 new changesets d73caddc5533 (1 drafts)
56 new changesets d73caddc5533 (1 drafts)
57 (run 'hg update' to get a working copy)
57 (run 'hg update' to get a working copy)
58 $ hg up 0
58 $ hg up 0
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 $ mkcommit B1
60 $ mkcommit B1
61 created new head
61 created new head
62 $ hg debugobsolete --record-parents `getid "desc(A0)"`
62 $ hg debugobsolete --record-parents `getid "desc(A0)"`
63 1 new obsolescence markers
63 1 new obsolescence markers
64 obsoleted 1 changesets
64 obsoleted 1 changesets
65 1 new orphan changesets
65 1 new orphan changesets
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
67 1 new obsolescence markers
67 1 new obsolescence markers
68 obsoleted 1 changesets
68 obsoleted 1 changesets
69 $ hg log -G --hidden
69 $ hg log -G --hidden
70 @ 25c56d33e4c4 (draft): B1
70 @ 25c56d33e4c4 (draft): B1
71 |
71 |
72 | x d73caddc5533 (draft): B0
72 | x d73caddc5533 (draft): B0
73 | |
73 | |
74 | x 8aaa48160adc (draft): A0
74 | x 8aaa48160adc (draft): A0
75 |/
75 |/
76 o 1e4be0697311 (public): root
76 o 1e4be0697311 (public): root
77
77
78
78
79 Actual testing
79 Actual testing
80 --------------
80 --------------
81
81
82 $ hg push
82 $ hg push
83 pushing to $TESTTMP/B3/server
83 pushing to $TESTTMP/B3/server
84 searching for changes
84 searching for changes
85 adding changesets
85 adding changesets
86 adding manifests
86 adding manifests
87 adding file changes
87 adding file changes
88 added 1 changesets with 1 changes to 1 files (+1 heads)
88 added 1 changesets with 1 changes to 1 files (+1 heads)
89 2 new obsolescence markers
89 2 new obsolescence markers
90 obsoleted 2 changesets
90 obsoleted 2 changesets
91
91
92 $ cd ../..
92 $ cd ../..
93
93
@@ -1,101 +1,101 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case B-5
2 Testing head checking code: Case B-5
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category B: simple case involving pruned changesets
11 Category B: simple case involving pruned changesets
12 TestCase 5: multi-changeset branch, mix of pruned and superceeded
12 TestCase 5: multi-changeset branch, mix of pruned and superseded
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 3 changeset branch
16 .. * 3 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * old head is pruned
20 .. * old head is pruned
21 .. * old mid is superceeded
21 .. * old mid is superseded
22 .. * old root is pruned
22 .. * old root is pruned
23 ..
23 ..
24 .. expected-result:
24 .. expected-result:
25 ..
25 ..
26 .. * push allowed
26 .. * push allowed
27 ..
27 ..
28 .. graph-summary:
28 .. graph-summary:
29 ..
29 ..
30 .. B βŠ—
30 .. B βŠ—
31 .. |
31 .. |
32 .. A ΓΈβ‡ β—” A'
32 .. A ΓΈβ‡ β—” A'
33 .. | |
33 .. | |
34 .. B βŠ— |
34 .. B βŠ— |
35 .. |/
35 .. |/
36 .. ●
36 .. ●
37
37
38 $ . $TESTDIR/testlib/push-checkheads-util.sh
38 $ . $TESTDIR/testlib/push-checkheads-util.sh
39
39
40 Test setup
40 Test setup
41 ----------
41 ----------
42
42
43 $ mkdir B5
43 $ mkdir B5
44 $ cd B5
44 $ cd B5
45 $ setuprepos
45 $ setuprepos
46 creating basic server and client repo
46 creating basic server and client repo
47 updating to branch default
47 updating to branch default
48 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 $ cd server
49 $ cd server
50 $ mkcommit B0
50 $ mkcommit B0
51 $ mkcommit C0
51 $ mkcommit C0
52 $ cd ../client
52 $ cd ../client
53 $ hg pull
53 $ hg pull
54 pulling from $TESTTMP/B5/server
54 pulling from $TESTTMP/B5/server
55 searching for changes
55 searching for changes
56 adding changesets
56 adding changesets
57 adding manifests
57 adding manifests
58 adding file changes
58 adding file changes
59 added 2 changesets with 2 changes to 2 files
59 added 2 changesets with 2 changes to 2 files
60 new changesets d73caddc5533:821fb21d0dd2 (2 drafts)
60 new changesets d73caddc5533:821fb21d0dd2 (2 drafts)
61 (run 'hg update' to get a working copy)
61 (run 'hg update' to get a working copy)
62 $ hg up 0
62 $ hg up 0
63 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
63 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
64 $ mkcommit B1
64 $ mkcommit B1
65 created new head
65 created new head
66 $ hg debugobsolete --record-parents `getid "desc(A0)"`
66 $ hg debugobsolete --record-parents `getid "desc(A0)"`
67 1 new obsolescence markers
67 1 new obsolescence markers
68 obsoleted 1 changesets
68 obsoleted 1 changesets
69 2 new orphan changesets
69 2 new orphan changesets
70 $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"`
70 $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"`
71 1 new obsolescence markers
71 1 new obsolescence markers
72 obsoleted 1 changesets
72 obsoleted 1 changesets
73 $ hg debugobsolete --record-parents `getid "desc(C0)"`
73 $ hg debugobsolete --record-parents `getid "desc(C0)"`
74 1 new obsolescence markers
74 1 new obsolescence markers
75 obsoleted 1 changesets
75 obsoleted 1 changesets
76 $ hg log -G --hidden
76 $ hg log -G --hidden
77 @ 25c56d33e4c4 (draft): B1
77 @ 25c56d33e4c4 (draft): B1
78 |
78 |
79 | x 821fb21d0dd2 (draft): C0
79 | x 821fb21d0dd2 (draft): C0
80 | |
80 | |
81 | x d73caddc5533 (draft): B0
81 | x d73caddc5533 (draft): B0
82 | |
82 | |
83 | x 8aaa48160adc (draft): A0
83 | x 8aaa48160adc (draft): A0
84 |/
84 |/
85 o 1e4be0697311 (public): root
85 o 1e4be0697311 (public): root
86
86
87
87
88 Actual testing
88 Actual testing
89 --------------
89 --------------
90
90
91 $ hg push
91 $ hg push
92 pushing to $TESTTMP/B5/server
92 pushing to $TESTTMP/B5/server
93 searching for changes
93 searching for changes
94 adding changesets
94 adding changesets
95 adding manifests
95 adding manifests
96 adding file changes
96 adding file changes
97 added 1 changesets with 1 changes to 1 files (+1 heads)
97 added 1 changesets with 1 changes to 1 files (+1 heads)
98 3 new obsolescence markers
98 3 new obsolescence markers
99 obsoleted 3 changesets
99 obsoleted 3 changesets
100
100
101 $ cd ../..
101 $ cd ../..
@@ -1,109 +1,109 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case B-2
2 Testing head checking code: Case B-2
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category B: simple case involving pruned changesets
11 Category B: simple case involving pruned changesets
12 TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other
12 TestCase 2: multi-changeset branch, head is pruned, rest is superseded, through other
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 changeset branch
16 .. * 2 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * old head is rewritten then pruned
20 .. * old head is rewritten then pruned
21 .. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch)
21 .. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch)
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push allowed
25 .. * push allowed
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B ΓΈβ‡ βŠ— B'
29 .. B ΓΈβ‡ βŠ— B'
30 .. | | A'
30 .. | | A'
31 .. A ΓΈβ‡ ΓΈβ‡ β—” A''
31 .. A ΓΈβ‡ ΓΈβ‡ β—” A''
32 .. |/ /
32 .. |/ /
33 .. | /
33 .. | /
34 .. |/
34 .. |/
35 .. ●
35 .. ●
36
36
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
38
39 Test setup
39 Test setup
40 ----------
40 ----------
41
41
42 $ mkdir B8
42 $ mkdir B8
43 $ cd B8
43 $ cd B8
44 $ setuprepos
44 $ setuprepos
45 creating basic server and client repo
45 creating basic server and client repo
46 updating to branch default
46 updating to branch default
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ cd server
48 $ cd server
49 $ mkcommit B0
49 $ mkcommit B0
50 $ cd ../client
50 $ cd ../client
51 $ hg pull
51 $ hg pull
52 pulling from $TESTTMP/B8/server
52 pulling from $TESTTMP/B8/server
53 searching for changes
53 searching for changes
54 adding changesets
54 adding changesets
55 adding manifests
55 adding manifests
56 adding file changes
56 adding file changes
57 added 1 changesets with 1 changes to 1 files
57 added 1 changesets with 1 changes to 1 files
58 new changesets d73caddc5533 (1 drafts)
58 new changesets d73caddc5533 (1 drafts)
59 (run 'hg update' to get a working copy)
59 (run 'hg update' to get a working copy)
60 $ hg up 0
60 $ hg up 0
61 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
61 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
62 $ mkcommit A1
62 $ mkcommit A1
63 created new head
63 created new head
64 $ mkcommit B1
64 $ mkcommit B1
65 $ hg up 0
65 $ hg up 0
66 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
66 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
67 $ mkcommit A2
67 $ mkcommit A2
68 created new head
68 created new head
69 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
69 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
70 1 new obsolescence markers
70 1 new obsolescence markers
71 obsoleted 1 changesets
71 obsoleted 1 changesets
72 1 new orphan changesets
72 1 new orphan changesets
73 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
73 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
74 1 new obsolescence markers
74 1 new obsolescence markers
75 obsoleted 1 changesets
75 obsoleted 1 changesets
76 $ hg debugobsolete --record-parents `getid "desc(B1)"`
76 $ hg debugobsolete --record-parents `getid "desc(B1)"`
77 1 new obsolescence markers
77 1 new obsolescence markers
78 obsoleted 1 changesets
78 obsoleted 1 changesets
79 $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
79 $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
80 1 new obsolescence markers
80 1 new obsolescence markers
81 obsoleted 1 changesets
81 obsoleted 1 changesets
82 $ hg log -G --hidden
82 $ hg log -G --hidden
83 @ c1f8d089020f (draft): A2
83 @ c1f8d089020f (draft): A2
84 |
84 |
85 | x 262c8c798096 (draft): B1
85 | x 262c8c798096 (draft): B1
86 | |
86 | |
87 | x f6082bc4ffef (draft): A1
87 | x f6082bc4ffef (draft): A1
88 |/
88 |/
89 | x d73caddc5533 (draft): B0
89 | x d73caddc5533 (draft): B0
90 | |
90 | |
91 | x 8aaa48160adc (draft): A0
91 | x 8aaa48160adc (draft): A0
92 |/
92 |/
93 o 1e4be0697311 (public): root
93 o 1e4be0697311 (public): root
94
94
95
95
96 Actual testing
96 Actual testing
97 --------------
97 --------------
98
98
99 $ hg push
99 $ hg push
100 pushing to $TESTTMP/B8/server
100 pushing to $TESTTMP/B8/server
101 searching for changes
101 searching for changes
102 adding changesets
102 adding changesets
103 adding manifests
103 adding manifests
104 adding file changes
104 adding file changes
105 added 1 changesets with 1 changes to 1 files (+1 heads)
105 added 1 changesets with 1 changes to 1 files (+1 heads)
106 4 new obsolescence markers
106 4 new obsolescence markers
107 obsoleted 2 changesets
107 obsoleted 2 changesets
108
108
109 $ cd ../..
109 $ cd ../..
@@ -1,72 +1,72 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-1
2 Testing head checking code: Case A-1
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 1: single-changeset branch
12 TestCase 1: single-changeset branch
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 1 changeset branch
16 .. * 1 changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 changeset branch succeeding to A
20 .. * 1 changeset branch succeeding to A
21 ..
21 ..
22 .. expected-result:
22 .. expected-result:
23 ..
23 ..
24 .. * push allowed
24 .. * push allowed
25 ..
25 ..
26 .. graph-summary:
26 .. graph-summary:
27 ..
27 ..
28 .. A ΓΈβ‡ β—” A'
28 .. A ΓΈβ‡ β—” A'
29 .. |/
29 .. |/
30 .. ●
30 .. ●
31
31
32 $ . $TESTDIR/testlib/push-checkheads-util.sh
32 $ . $TESTDIR/testlib/push-checkheads-util.sh
33
33
34 Test setup
34 Test setup
35 ----------
35 ----------
36
36
37 $ mkdir A1
37 $ mkdir A1
38 $ cd A1
38 $ cd A1
39 $ setuprepos
39 $ setuprepos
40 creating basic server and client repo
40 creating basic server and client repo
41 updating to branch default
41 updating to branch default
42 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 $ cd client
43 $ cd client
44 $ hg up 0
44 $ hg up 0
45 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
45 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
46 $ mkcommit A1
46 $ mkcommit A1
47 created new head
47 created new head
48 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
48 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
49 1 new obsolescence markers
49 1 new obsolescence markers
50 obsoleted 1 changesets
50 obsoleted 1 changesets
51 $ hg log -G --hidden
51 $ hg log -G --hidden
52 @ f6082bc4ffef (draft): A1
52 @ f6082bc4ffef (draft): A1
53 |
53 |
54 | x 8aaa48160adc (draft): A0
54 | x 8aaa48160adc (draft): A0
55 |/
55 |/
56 o 1e4be0697311 (public): root
56 o 1e4be0697311 (public): root
57
57
58
58
59 Actual testing
59 Actual testing
60 --------------
60 --------------
61
61
62 $ hg push
62 $ hg push
63 pushing to $TESTTMP/A1/server
63 pushing to $TESTTMP/A1/server
64 searching for changes
64 searching for changes
65 adding changesets
65 adding changesets
66 adding manifests
66 adding manifests
67 adding file changes
67 adding file changes
68 added 1 changesets with 1 changes to 1 files (+1 heads)
68 added 1 changesets with 1 changes to 1 files (+1 heads)
69 1 new obsolescence markers
69 1 new obsolescence markers
70 obsoleted 1 changesets
70 obsoleted 1 changesets
71
71
72 $ cd ../..
72 $ cd ../..
@@ -1,94 +1,94 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-2
2 Testing head checking code: Case A-2
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 2: multi-changeset branch
12 TestCase 2: multi-changeset branch
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 1 branch with 2 changesets
16 .. * 1 branch with 2 changesets
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * another 2-changeset branch succeeding the old one
20 .. * another 2-changeset branch succeeding the old one
21 ..
21 ..
22 .. expected-result:
22 .. expected-result:
23 ..
23 ..
24 .. * push allowed
24 .. * push allowed
25 ..
25 ..
26 .. graph-summary:
26 .. graph-summary:
27 ..
27 ..
28 .. B ΓΈβ‡ β—” B'
28 .. B ΓΈβ‡ β—” B'
29 .. | |
29 .. | |
30 .. A ΓΈβ‡ β—” A'
30 .. A ΓΈβ‡ β—” A'
31 .. |/
31 .. |/
32 .. ●
32 .. ●
33
33
34 $ . $TESTDIR/testlib/push-checkheads-util.sh
34 $ . $TESTDIR/testlib/push-checkheads-util.sh
35
35
36 Test setup
36 Test setup
37 ----------
37 ----------
38
38
39 $ mkdir A2
39 $ mkdir A2
40 $ cd A2
40 $ cd A2
41 $ setuprepos
41 $ setuprepos
42 creating basic server and client repo
42 creating basic server and client repo
43 updating to branch default
43 updating to branch default
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 $ cd server
45 $ cd server
46 $ mkcommit B0
46 $ mkcommit B0
47 $ cd ../client
47 $ cd ../client
48 $ hg pull
48 $ hg pull
49 pulling from $TESTTMP/A2/server
49 pulling from $TESTTMP/A2/server
50 searching for changes
50 searching for changes
51 adding changesets
51 adding changesets
52 adding manifests
52 adding manifests
53 adding file changes
53 adding file changes
54 added 1 changesets with 1 changes to 1 files
54 added 1 changesets with 1 changes to 1 files
55 new changesets d73caddc5533 (1 drafts)
55 new changesets d73caddc5533 (1 drafts)
56 (run 'hg update' to get a working copy)
56 (run 'hg update' to get a working copy)
57 $ hg up 0
57 $ hg up 0
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 $ mkcommit A1
59 $ mkcommit A1
60 created new head
60 created new head
61 $ mkcommit B1
61 $ mkcommit B1
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
63 1 new obsolescence markers
63 1 new obsolescence markers
64 obsoleted 1 changesets
64 obsoleted 1 changesets
65 1 new orphan changesets
65 1 new orphan changesets
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
67 1 new obsolescence markers
67 1 new obsolescence markers
68 obsoleted 1 changesets
68 obsoleted 1 changesets
69 $ hg log -G --hidden
69 $ hg log -G --hidden
70 @ 262c8c798096 (draft): B1
70 @ 262c8c798096 (draft): B1
71 |
71 |
72 o f6082bc4ffef (draft): A1
72 o f6082bc4ffef (draft): A1
73 |
73 |
74 | x d73caddc5533 (draft): B0
74 | x d73caddc5533 (draft): B0
75 | |
75 | |
76 | x 8aaa48160adc (draft): A0
76 | x 8aaa48160adc (draft): A0
77 |/
77 |/
78 o 1e4be0697311 (public): root
78 o 1e4be0697311 (public): root
79
79
80
80
81 Actual testing
81 Actual testing
82 --------------
82 --------------
83
83
84 $ hg push
84 $ hg push
85 pushing to $TESTTMP/A2/server
85 pushing to $TESTTMP/A2/server
86 searching for changes
86 searching for changes
87 adding changesets
87 adding changesets
88 adding manifests
88 adding manifests
89 adding file changes
89 adding file changes
90 added 2 changesets with 2 changes to 2 files (+1 heads)
90 added 2 changesets with 2 changes to 2 files (+1 heads)
91 2 new obsolescence markers
91 2 new obsolescence markers
92 obsoleted 2 changesets
92 obsoleted 2 changesets
93
93
94 $ cd ../..
94 $ cd ../..
@@ -1,97 +1,97 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-3
2 Testing head checking code: Case A-3
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 3: multi-changeset branch with reordering
12 TestCase 3: multi-changeset branch with reordering
13
13
14 Push should be allowed
14 Push should be allowed
15 .. old-state:
15 .. old-state:
16 ..
16 ..
17 .. * 2 changeset branch
17 .. * 2 changeset branch
18 ..
18 ..
19 .. new-state:
19 .. new-state:
20 ..
20 ..
21 .. * 2 changeset branch succeeding the old one with reordering
21 .. * 2 changeset branch succeeding the old one with reordering
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push allowed
25 .. * push allowed
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B ΓΈβ‡ β‡ 
29 .. B ΓΈβ‡ β‡ 
30 .. | ⇑
30 .. | ⇑
31 .. A ΓΈβ‡ β‡ β‡ β—‹ A'
31 .. A ΓΈβ‡ β‡ β‡ β—‹ A'
32 .. | ⇑/
32 .. | ⇑/
33 .. | β—‹ B'
33 .. | β—‹ B'
34 .. |/
34 .. |/
35 .. ●
35 .. ●
36
36
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
38
39 Test setup
39 Test setup
40 ----------
40 ----------
41
41
42 $ mkdir A3
42 $ mkdir A3
43 $ cd A3
43 $ cd A3
44 $ setuprepos
44 $ setuprepos
45 creating basic server and client repo
45 creating basic server and client repo
46 updating to branch default
46 updating to branch default
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ cd server
48 $ cd server
49 $ mkcommit B0
49 $ mkcommit B0
50 $ cd ../client
50 $ cd ../client
51 $ hg pull
51 $ hg pull
52 pulling from $TESTTMP/A3/server
52 pulling from $TESTTMP/A3/server
53 searching for changes
53 searching for changes
54 adding changesets
54 adding changesets
55 adding manifests
55 adding manifests
56 adding file changes
56 adding file changes
57 added 1 changesets with 1 changes to 1 files
57 added 1 changesets with 1 changes to 1 files
58 new changesets d73caddc5533 (1 drafts)
58 new changesets d73caddc5533 (1 drafts)
59 (run 'hg update' to get a working copy)
59 (run 'hg update' to get a working copy)
60 $ hg up 0
60 $ hg up 0
61 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
61 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
62 $ mkcommit B1
62 $ mkcommit B1
63 created new head
63 created new head
64 $ mkcommit A1
64 $ mkcommit A1
65 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
65 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
66 1 new obsolescence markers
66 1 new obsolescence markers
67 obsoleted 1 changesets
67 obsoleted 1 changesets
68 1 new orphan changesets
68 1 new orphan changesets
69 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
69 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
70 1 new obsolescence markers
70 1 new obsolescence markers
71 obsoleted 1 changesets
71 obsoleted 1 changesets
72 $ hg log -G --hidden
72 $ hg log -G --hidden
73 @ c1c7524e9488 (draft): A1
73 @ c1c7524e9488 (draft): A1
74 |
74 |
75 o 25c56d33e4c4 (draft): B1
75 o 25c56d33e4c4 (draft): B1
76 |
76 |
77 | x d73caddc5533 (draft): B0
77 | x d73caddc5533 (draft): B0
78 | |
78 | |
79 | x 8aaa48160adc (draft): A0
79 | x 8aaa48160adc (draft): A0
80 |/
80 |/
81 o 1e4be0697311 (public): root
81 o 1e4be0697311 (public): root
82
82
83
83
84 Actual testing
84 Actual testing
85 --------------
85 --------------
86
86
87 $ hg push
87 $ hg push
88 pushing to $TESTTMP/A3/server
88 pushing to $TESTTMP/A3/server
89 searching for changes
89 searching for changes
90 adding changesets
90 adding changesets
91 adding manifests
91 adding manifests
92 adding file changes
92 adding file changes
93 added 2 changesets with 2 changes to 2 files (+1 heads)
93 added 2 changesets with 2 changes to 2 files (+1 heads)
94 2 new obsolescence markers
94 2 new obsolescence markers
95 obsoleted 2 changesets
95 obsoleted 2 changesets
96
96
97 $ cd ../..
97 $ cd ../..
@@ -1,77 +1,77 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-4
2 Testing head checking code: Case A-4
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 4: New changeset as children of the successor
12 TestCase 4: New changeset as children of the successor
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 1-changeset branch
16 .. * 1-changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 2-changeset branch, first is a successor, but head is new
20 .. * 2-changeset branch, first is a successor, but head is new
21 ..
21 ..
22 .. expected-result:
22 .. expected-result:
23 ..
23 ..
24 .. * push allowed
24 .. * push allowed
25 ..
25 ..
26 .. graph-summary:
26 .. graph-summary:
27 ..
27 ..
28 .. β—” B
28 .. β—” B
29 .. |
29 .. |
30 .. A ΓΈβ‡ β—” A'
30 .. A ΓΈβ‡ β—” A'
31 .. |/
31 .. |/
32 .. ●
32 .. ●
33
33
34 $ . $TESTDIR/testlib/push-checkheads-util.sh
34 $ . $TESTDIR/testlib/push-checkheads-util.sh
35
35
36 Test setup
36 Test setup
37 ----------
37 ----------
38
38
39 $ mkdir A4
39 $ mkdir A4
40 $ cd A4
40 $ cd A4
41 $ setuprepos
41 $ setuprepos
42 creating basic server and client repo
42 creating basic server and client repo
43 updating to branch default
43 updating to branch default
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 $ cd client
45 $ cd client
46 $ hg up 0
46 $ hg up 0
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
48 $ mkcommit A1
48 $ mkcommit A1
49 created new head
49 created new head
50 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
50 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
51 1 new obsolescence markers
51 1 new obsolescence markers
52 obsoleted 1 changesets
52 obsoleted 1 changesets
53 $ mkcommit B0
53 $ mkcommit B0
54 $ hg log -G --hidden
54 $ hg log -G --hidden
55 @ f40ded968333 (draft): B0
55 @ f40ded968333 (draft): B0
56 |
56 |
57 o f6082bc4ffef (draft): A1
57 o f6082bc4ffef (draft): A1
58 |
58 |
59 | x 8aaa48160adc (draft): A0
59 | x 8aaa48160adc (draft): A0
60 |/
60 |/
61 o 1e4be0697311 (public): root
61 o 1e4be0697311 (public): root
62
62
63
63
64 Actual testing
64 Actual testing
65 --------------
65 --------------
66
66
67 $ hg push
67 $ hg push
68 pushing to $TESTTMP/A4/server
68 pushing to $TESTTMP/A4/server
69 searching for changes
69 searching for changes
70 adding changesets
70 adding changesets
71 adding manifests
71 adding manifests
72 adding file changes
72 adding file changes
73 added 2 changesets with 2 changes to 2 files (+1 heads)
73 added 2 changesets with 2 changes to 2 files (+1 heads)
74 1 new obsolescence markers
74 1 new obsolescence markers
75 obsoleted 1 changesets
75 obsoleted 1 changesets
76
76
77 $ cd ../../
77 $ cd ../../
@@ -1,78 +1,78 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-5
2 Testing head checking code: Case A-5
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 5: New changeset as parent of the successor
12 TestCase 5: New changeset as parent of the successor
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 1-changeset branch
16 .. * 1-changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 2rchangeset branch, head is a successor, but other is new
20 .. * 2rchangeset branch, head is a successor, but other is new
21 ..
21 ..
22 .. expected-result:
22 .. expected-result:
23 ..
23 ..
24 .. * push allowed
24 .. * push allowed
25 ..
25 ..
26 .. graph-summary:
26 .. graph-summary:
27 ..
27 ..
28 .. A ΓΈβ‡ β—” A'
28 .. A ΓΈβ‡ β—” A'
29 .. | |
29 .. | |
30 .. | β—” B
30 .. | β—” B
31 .. |/
31 .. |/
32 .. ●
32 .. ●
33
33
34 $ . $TESTDIR/testlib/push-checkheads-util.sh
34 $ . $TESTDIR/testlib/push-checkheads-util.sh
35
35
36 Test setup
36 Test setup
37 ----------
37 ----------
38
38
39 $ mkdir A5
39 $ mkdir A5
40 $ cd A5
40 $ cd A5
41 $ setuprepos
41 $ setuprepos
42 creating basic server and client repo
42 creating basic server and client repo
43 updating to branch default
43 updating to branch default
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 $ cd client
45 $ cd client
46 $ hg up 0
46 $ hg up 0
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
48 $ mkcommit B0
48 $ mkcommit B0
49 created new head
49 created new head
50 $ mkcommit A1
50 $ mkcommit A1
51 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
51 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
52 1 new obsolescence markers
52 1 new obsolescence markers
53 obsoleted 1 changesets
53 obsoleted 1 changesets
54 $ hg log -G --hidden
54 $ hg log -G --hidden
55 @ ba93660aff8d (draft): A1
55 @ ba93660aff8d (draft): A1
56 |
56 |
57 o 74ff5441d343 (draft): B0
57 o 74ff5441d343 (draft): B0
58 |
58 |
59 | x 8aaa48160adc (draft): A0
59 | x 8aaa48160adc (draft): A0
60 |/
60 |/
61 o 1e4be0697311 (public): root
61 o 1e4be0697311 (public): root
62
62
63
63
64 Actual testing
64 Actual testing
65 --------------
65 --------------
66
66
67 $ hg push
67 $ hg push
68 pushing to $TESTTMP/A5/server
68 pushing to $TESTTMP/A5/server
69 searching for changes
69 searching for changes
70 adding changesets
70 adding changesets
71 adding manifests
71 adding manifests
72 adding file changes
72 adding file changes
73 added 2 changesets with 2 changes to 2 files (+1 heads)
73 added 2 changesets with 2 changes to 2 files (+1 heads)
74 1 new obsolescence markers
74 1 new obsolescence markers
75 obsoleted 1 changesets
75 obsoleted 1 changesets
76
76
77 $ cd ../..
77 $ cd ../..
78
78
@@ -1,105 +1,105 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-6
2 Testing head checking code: Case A-6
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head
12 TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 branch (1-changeset, and 2-changesets)
16 .. * 2 branch (1-changeset, and 2-changesets)
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 new branch superceeding the base of the old-2-changesets-branch,
20 .. * 1 new branch superseding the base of the old-2-changesets-branch,
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
21 .. * 1 new changesets on the old-1-changeset-branch superseding the head of the other
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push allowed
25 .. * push allowed
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B'β—”β‡’ΓΈ B
29 .. B'β—”β‡’ΓΈ B
30 .. | |
30 .. | |
31 .. A | ΓΈβ‡ β—” A'
31 .. A | ΓΈβ‡ β—” A'
32 .. | |/
32 .. | |/
33 .. C ● |
33 .. C ● |
34 .. \|
34 .. \|
35 .. ●
35 .. ●
36
36
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
38
39 Test setup
39 Test setup
40 ----------
40 ----------
41
41
42 $ mkdir A6
42 $ mkdir A6
43 $ cd A6
43 $ cd A6
44 $ setuprepos
44 $ setuprepos
45 creating basic server and client repo
45 creating basic server and client repo
46 updating to branch default
46 updating to branch default
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ cd server
48 $ cd server
49 $ mkcommit B0
49 $ mkcommit B0
50 $ hg up 0
50 $ hg up 0
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
52 $ mkcommit C0
52 $ mkcommit C0
53 created new head
53 created new head
54 $ cd ../client
54 $ cd ../client
55 $ hg pull
55 $ hg pull
56 pulling from $TESTTMP/A6/server
56 pulling from $TESTTMP/A6/server
57 searching for changes
57 searching for changes
58 adding changesets
58 adding changesets
59 adding manifests
59 adding manifests
60 adding file changes
60 adding file changes
61 added 2 changesets with 2 changes to 2 files (+1 heads)
61 added 2 changesets with 2 changes to 2 files (+1 heads)
62 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
62 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
63 (run 'hg heads' to see heads, 'hg merge' to merge)
63 (run 'hg heads' to see heads, 'hg merge' to merge)
64 $ hg up 0
64 $ hg up 0
65 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 $ mkcommit A1
66 $ mkcommit A1
67 created new head
67 created new head
68 $ hg up 'desc(C0)'
68 $ hg up 'desc(C0)'
69 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
70 $ mkcommit B1
70 $ mkcommit B1
71 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
71 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
72 1 new obsolescence markers
72 1 new obsolescence markers
73 obsoleted 1 changesets
73 obsoleted 1 changesets
74 1 new orphan changesets
74 1 new orphan changesets
75 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
75 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
76 1 new obsolescence markers
76 1 new obsolescence markers
77 obsoleted 1 changesets
77 obsoleted 1 changesets
78 $ hg log -G --hidden
78 $ hg log -G --hidden
79 @ d70a1f75a020 (draft): B1
79 @ d70a1f75a020 (draft): B1
80 |
80 |
81 | o f6082bc4ffef (draft): A1
81 | o f6082bc4ffef (draft): A1
82 | |
82 | |
83 o | 0f88766e02d6 (draft): C0
83 o | 0f88766e02d6 (draft): C0
84 |/
84 |/
85 | x d73caddc5533 (draft): B0
85 | x d73caddc5533 (draft): B0
86 | |
86 | |
87 | x 8aaa48160adc (draft): A0
87 | x 8aaa48160adc (draft): A0
88 |/
88 |/
89 o 1e4be0697311 (public): root
89 o 1e4be0697311 (public): root
90
90
91
91
92 Actual testing
92 Actual testing
93 --------------
93 --------------
94
94
95 $ hg push
95 $ hg push
96 pushing to $TESTTMP/A6/server
96 pushing to $TESTTMP/A6/server
97 searching for changes
97 searching for changes
98 adding changesets
98 adding changesets
99 adding manifests
99 adding manifests
100 adding file changes
100 adding file changes
101 added 2 changesets with 2 changes to 2 files (+1 heads)
101 added 2 changesets with 2 changes to 2 files (+1 heads)
102 2 new obsolescence markers
102 2 new obsolescence markers
103 obsoleted 2 changesets
103 obsoleted 2 changesets
104
104
105 $ cd ../..
105 $ cd ../..
@@ -1,105 +1,105 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-7
2 Testing head checking code: Case A-7
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head
12 TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 branch (1-changeset, and 2-changesets)
16 .. * 2 branch (1-changeset, and 2-changesets)
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 new branch superceeding the head of the old-2-changesets-branch,
20 .. * 1 new branch superseding the head of the old-2-changesets-branch,
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
21 .. * 1 new changesets on the old-1-changeset-branch superseding the base of the other
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push allowed
25 .. * push allowed
26 ..
26 ..
27 .. graph-summary:
27 .. graph-summary:
28 ..
28 ..
29 .. B ΓΈβ‡ β—” B'
29 .. B ΓΈβ‡ β—” B'
30 .. | |
30 .. | |
31 .. A'β—”β‡’ΓΈ |
31 .. A'β—”β‡’ΓΈ |
32 .. | |/
32 .. | |/
33 .. C ● |
33 .. C ● |
34 .. \|
34 .. \|
35 .. ●
35 .. ●
36
36
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
38
39 Test setup
39 Test setup
40 ----------
40 ----------
41
41
42 $ mkdir A7
42 $ mkdir A7
43 $ cd A7
43 $ cd A7
44 $ setuprepos
44 $ setuprepos
45 creating basic server and client repo
45 creating basic server and client repo
46 updating to branch default
46 updating to branch default
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ cd server
48 $ cd server
49 $ mkcommit B0
49 $ mkcommit B0
50 $ hg up 0
50 $ hg up 0
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
52 $ mkcommit C0
52 $ mkcommit C0
53 created new head
53 created new head
54 $ cd ../client
54 $ cd ../client
55 $ hg pull
55 $ hg pull
56 pulling from $TESTTMP/A7/server
56 pulling from $TESTTMP/A7/server
57 searching for changes
57 searching for changes
58 adding changesets
58 adding changesets
59 adding manifests
59 adding manifests
60 adding file changes
60 adding file changes
61 added 2 changesets with 2 changes to 2 files (+1 heads)
61 added 2 changesets with 2 changes to 2 files (+1 heads)
62 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
62 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
63 (run 'hg heads' to see heads, 'hg merge' to merge)
63 (run 'hg heads' to see heads, 'hg merge' to merge)
64 $ hg up 'desc(C0)'
64 $ hg up 'desc(C0)'
65 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
65 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 $ mkcommit A1
66 $ mkcommit A1
67 $ hg up 0
67 $ hg up 0
68 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
68 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
69 $ mkcommit B1
69 $ mkcommit B1
70 created new head
70 created new head
71 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
71 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
72 1 new obsolescence markers
72 1 new obsolescence markers
73 obsoleted 1 changesets
73 obsoleted 1 changesets
74 1 new orphan changesets
74 1 new orphan changesets
75 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
75 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
76 1 new obsolescence markers
76 1 new obsolescence markers
77 obsoleted 1 changesets
77 obsoleted 1 changesets
78 $ hg log -G --hidden
78 $ hg log -G --hidden
79 @ 25c56d33e4c4 (draft): B1
79 @ 25c56d33e4c4 (draft): B1
80 |
80 |
81 | o a0802eb7fc1b (draft): A1
81 | o a0802eb7fc1b (draft): A1
82 | |
82 | |
83 | o 0f88766e02d6 (draft): C0
83 | o 0f88766e02d6 (draft): C0
84 |/
84 |/
85 | x d73caddc5533 (draft): B0
85 | x d73caddc5533 (draft): B0
86 | |
86 | |
87 | x 8aaa48160adc (draft): A0
87 | x 8aaa48160adc (draft): A0
88 |/
88 |/
89 o 1e4be0697311 (public): root
89 o 1e4be0697311 (public): root
90
90
91
91
92 Actual testing
92 Actual testing
93 --------------
93 --------------
94
94
95 $ hg push
95 $ hg push
96 pushing to $TESTTMP/A7/server
96 pushing to $TESTTMP/A7/server
97 searching for changes
97 searching for changes
98 adding changesets
98 adding changesets
99 adding manifests
99 adding manifests
100 adding file changes
100 adding file changes
101 added 2 changesets with 2 changes to 2 files (+1 heads)
101 added 2 changesets with 2 changes to 2 files (+1 heads)
102 2 new obsolescence markers
102 2 new obsolescence markers
103 obsoleted 2 changesets
103 obsoleted 2 changesets
104
104
105 $ cd ../..
105 $ cd ../..
@@ -1,84 +1,84 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case A-8
2 Testing head checking code: Case A-8
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category A: simple case involving a branch being superceeded by another.
11 Category A: simple case involving a branch being superseded by another.
12 TestCase 8: single-changeset branch indirect rewrite
12 TestCase 8: single-changeset branch indirect rewrite
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 1-changeset branch
16 .. * 1-changeset branch
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1-changeset branch succeeding to A, through another unpushed changesets
20 .. * 1-changeset branch succeeding to A, through another unpushed changesets
21 ..
21 ..
22 .. expected-result:
22 .. expected-result:
23 ..
23 ..
24 .. * push allowed
24 .. * push allowed
25 ..
25 ..
26 .. graph-summary:
26 .. graph-summary:
27 ..
27 ..
28 .. A'
28 .. A'
29 .. A ΓΈβ‡ ΓΈβ‡ β—” A''
29 .. A ΓΈβ‡ ΓΈβ‡ β—” A''
30 .. |/ /
30 .. |/ /
31 .. | /
31 .. | /
32 .. |/
32 .. |/
33 .. ●
33 .. ●
34
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
36
37 Test setup
37 Test setup
38 ----------
38 ----------
39
39
40 $ mkdir A8
40 $ mkdir A8
41 $ cd A8
41 $ cd A8
42 $ setuprepos
42 $ setuprepos
43 creating basic server and client repo
43 creating basic server and client repo
44 updating to branch default
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd client
46 $ cd client
47 $ hg up 0
47 $ hg up 0
48 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
48 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
49 $ mkcommit A1
49 $ mkcommit A1
50 created new head
50 created new head
51 $ hg up 0
51 $ hg up 0
52 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
52 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
53 $ mkcommit A2
53 $ mkcommit A2
54 created new head
54 created new head
55 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
55 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
56 1 new obsolescence markers
56 1 new obsolescence markers
57 obsoleted 1 changesets
57 obsoleted 1 changesets
58 $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
58 $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
59 1 new obsolescence markers
59 1 new obsolescence markers
60 obsoleted 1 changesets
60 obsoleted 1 changesets
61 $ hg log -G --hidden
61 $ hg log -G --hidden
62 @ c1f8d089020f (draft): A2
62 @ c1f8d089020f (draft): A2
63 |
63 |
64 | x f6082bc4ffef (draft): A1
64 | x f6082bc4ffef (draft): A1
65 |/
65 |/
66 | x 8aaa48160adc (draft): A0
66 | x 8aaa48160adc (draft): A0
67 |/
67 |/
68 o 1e4be0697311 (public): root
68 o 1e4be0697311 (public): root
69
69
70
70
71 Actual testing
71 Actual testing
72 --------------
72 --------------
73
73
74 $ hg push
74 $ hg push
75 pushing to $TESTTMP/A8/server
75 pushing to $TESTTMP/A8/server
76 searching for changes
76 searching for changes
77 adding changesets
77 adding changesets
78 adding manifests
78 adding manifests
79 adding file changes
79 adding file changes
80 added 1 changesets with 1 changes to 1 files (+1 heads)
80 added 1 changesets with 1 changes to 1 files (+1 heads)
81 2 new obsolescence markers
81 2 new obsolescence markers
82 obsoleted 1 changesets
82 obsoleted 1 changesets
83
83
84 $ cd ../..
84 $ cd ../..
@@ -1,129 +1,129 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case D-4
2 Testing head checking code: Case D-4
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category D: remote head is "obs-affected" locally, but result is not part of the push
11 Category D: remote head is "obs-affected" locally, but result is not part of the push
12 TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch)
12 TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch)
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 branch (1 changeset, and 2 changesets)
16 .. * 2 branch (1 changeset, and 2 changesets)
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 new branch superceeding the base of the old-2-changesets-branch,
20 .. * 1 new branch superseding the base of the old-2-changesets-branch,
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
21 .. * 1 new changesets on the old-1-changeset-branch superseding the head of the other
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push the new branch only -> push denied (variant a)
25 .. * push the new branch only -> push denied (variant a)
26 .. * push the existing branch only -> push allowed (variant b)
26 .. * push the existing branch only -> push allowed (variant b)
27 .. (pushing all is tested as case A-7)
27 .. (pushing all is tested as case A-7)
28 ..
28 ..
29 .. graph-summary:
29 .. graph-summary:
30 ..
30 ..
31 .. (variant a)
31 .. (variant a)
32 ..
32 ..
33 .. B'β—‹β‡’ΓΈ B
33 .. B'β—‹β‡’ΓΈ B
34 .. | |
34 .. | |
35 .. A | ΓΈβ‡ β—” A'
35 .. A | ΓΈβ‡ β—” A'
36 .. | |/
36 .. | |/
37 .. C ● |
37 .. C ● |
38 .. \|
38 .. \|
39 .. ●
39 .. ●
40 ..
40 ..
41 .. or (variant b)
41 .. or (variant b)
42 ..
42 ..
43 .. B'β—”β‡’ΓΈ B
43 .. B'β—”β‡’ΓΈ B
44 .. | |
44 .. | |
45 .. A | ΓΈβ‡ β—‹ A'
45 .. A | ΓΈβ‡ β—‹ A'
46 .. | |/
46 .. | |/
47 .. C ● |
47 .. C ● |
48 .. \|
48 .. \|
49 .. ●
49 .. ●
50
50
51 $ . $TESTDIR/testlib/push-checkheads-util.sh
51 $ . $TESTDIR/testlib/push-checkheads-util.sh
52
52
53 Test setup
53 Test setup
54 ----------
54 ----------
55
55
56 $ mkdir D4
56 $ mkdir D4
57 $ cd D4
57 $ cd D4
58 $ setuprepos
58 $ setuprepos
59 creating basic server and client repo
59 creating basic server and client repo
60 updating to branch default
60 updating to branch default
61 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 $ cd server
62 $ cd server
63 $ mkcommit B0
63 $ mkcommit B0
64 $ hg up 0
64 $ hg up 0
65 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
66 $ mkcommit C0
66 $ mkcommit C0
67 created new head
67 created new head
68 $ cd ../client
68 $ cd ../client
69 $ hg pull
69 $ hg pull
70 pulling from $TESTTMP/D4/server
70 pulling from $TESTTMP/D4/server
71 searching for changes
71 searching for changes
72 adding changesets
72 adding changesets
73 adding manifests
73 adding manifests
74 adding file changes
74 adding file changes
75 added 2 changesets with 2 changes to 2 files (+1 heads)
75 added 2 changesets with 2 changes to 2 files (+1 heads)
76 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
76 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
77 (run 'hg heads' to see heads, 'hg merge' to merge)
77 (run 'hg heads' to see heads, 'hg merge' to merge)
78 $ hg up 0
78 $ hg up 0
79 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
79 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
80 $ mkcommit A1
80 $ mkcommit A1
81 created new head
81 created new head
82 $ hg up 'desc(C0)'
82 $ hg up 'desc(C0)'
83 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
84 $ mkcommit B1
84 $ mkcommit B1
85 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
85 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
86 1 new obsolescence markers
86 1 new obsolescence markers
87 obsoleted 1 changesets
87 obsoleted 1 changesets
88 1 new orphan changesets
88 1 new orphan changesets
89 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
89 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
90 1 new obsolescence markers
90 1 new obsolescence markers
91 obsoleted 1 changesets
91 obsoleted 1 changesets
92 $ hg log -G --hidden
92 $ hg log -G --hidden
93 @ d70a1f75a020 (draft): B1
93 @ d70a1f75a020 (draft): B1
94 |
94 |
95 | o f6082bc4ffef (draft): A1
95 | o f6082bc4ffef (draft): A1
96 | |
96 | |
97 o | 0f88766e02d6 (draft): C0
97 o | 0f88766e02d6 (draft): C0
98 |/
98 |/
99 | x d73caddc5533 (draft): B0
99 | x d73caddc5533 (draft): B0
100 | |
100 | |
101 | x 8aaa48160adc (draft): A0
101 | x 8aaa48160adc (draft): A0
102 |/
102 |/
103 o 1e4be0697311 (public): root
103 o 1e4be0697311 (public): root
104
104
105
105
106 Actual testing (new branch only)
106 Actual testing (new branch only)
107 --------------------------------
107 --------------------------------
108
108
109 $ hg push --rev 'desc(A1)'
109 $ hg push --rev 'desc(A1)'
110 pushing to $TESTTMP/D4/server
110 pushing to $TESTTMP/D4/server
111 searching for changes
111 searching for changes
112 abort: push creates new remote head f6082bc4ffef
112 abort: push creates new remote head f6082bc4ffef
113 (merge or see 'hg help push' for details about pushing new heads)
113 (merge or see 'hg help push' for details about pushing new heads)
114 [20]
114 [20]
115
115
116 Actual testing (existing branch only)
116 Actual testing (existing branch only)
117 ------------------------------------
117 ------------------------------------
118
118
119 $ hg push --rev 'desc(B1)'
119 $ hg push --rev 'desc(B1)'
120 pushing to $TESTTMP/D4/server
120 pushing to $TESTTMP/D4/server
121 searching for changes
121 searching for changes
122 adding changesets
122 adding changesets
123 adding manifests
123 adding manifests
124 adding file changes
124 adding file changes
125 added 1 changesets with 1 changes to 1 files
125 added 1 changesets with 1 changes to 1 files
126 1 new obsolescence markers
126 1 new obsolescence markers
127 obsoleted 1 changesets
127 obsoleted 1 changesets
128
128
129 $ cd ../..
129 $ cd ../..
@@ -1,115 +1,115 b''
1 ====================================
1 ====================================
2 Testing head checking code: Case D-5
2 Testing head checking code: Case D-5
3 ====================================
3 ====================================
4
4
5 Mercurial checks for the introduction of new heads on push. Evolution comes
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
6 into play to detect if existing branches on the server are being replaced by
7 some of the new one we push.
7 some of the new one we push.
8
8
9 This case is part of a series of tests checking this behavior.
9 This case is part of a series of tests checking this behavior.
10
10
11 Category D: remote head is "obs-affected" locally, but result is not part of the push
11 Category D: remote head is "obs-affected" locally, but result is not part of the push
12 TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch)
12 TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch)
13
13
14 .. old-state:
14 .. old-state:
15 ..
15 ..
16 .. * 2 branch (1 changeset, and 2 changesets)
16 .. * 2 branch (1 changeset, and 2 changesets)
17 ..
17 ..
18 .. new-state:
18 .. new-state:
19 ..
19 ..
20 .. * 1 new branch superceeding the head of the old-2-changesets-branch,
20 .. * 1 new branch superseding the head of the old-2-changesets-branch,
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
21 .. * 1 new changesets on the old-1-changeset-branch superseding the base of the other
22 ..
22 ..
23 .. expected-result:
23 .. expected-result:
24 ..
24 ..
25 .. * push the new branch only -> push denied
25 .. * push the new branch only -> push denied
26 .. * push the existing branch only -> push allowed
26 .. * push the existing branch only -> push allowed
27 .. /!\ This push create unstability/orphaning on the other hand and we should
27 .. /!\ This push create unstability/orphaning on the other hand and we should
28 .. probably detect/warn agains that.
28 .. probably detect/warn agains that.
29 ..
29 ..
30 .. graph-summary:
30 .. graph-summary:
31 ..
31 ..
32 .. B ΓΈβ‡ β—” B'
32 .. B ΓΈβ‡ β—” B'
33 .. | |
33 .. | |
34 .. A'β—”β‡’ΓΈ |
34 .. A'β—”β‡’ΓΈ |
35 .. | |/
35 .. | |/
36 .. C ● |
36 .. C ● |
37 .. \|
37 .. \|
38 .. ●
38 .. ●
39
39
40 $ . $TESTDIR/testlib/push-checkheads-util.sh
40 $ . $TESTDIR/testlib/push-checkheads-util.sh
41
41
42 Test setup
42 Test setup
43 ----------
43 ----------
44
44
45 $ mkdir D5
45 $ mkdir D5
46 $ cd D5
46 $ cd D5
47 $ setuprepos
47 $ setuprepos
48 creating basic server and client repo
48 creating basic server and client repo
49 updating to branch default
49 updating to branch default
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 $ cd server
51 $ cd server
52 $ mkcommit B0
52 $ mkcommit B0
53 $ hg up 0
53 $ hg up 0
54 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
54 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
55 $ mkcommit C0
55 $ mkcommit C0
56 created new head
56 created new head
57 $ cd ../client
57 $ cd ../client
58 $ hg pull
58 $ hg pull
59 pulling from $TESTTMP/D5/server
59 pulling from $TESTTMP/D5/server
60 searching for changes
60 searching for changes
61 adding changesets
61 adding changesets
62 adding manifests
62 adding manifests
63 adding file changes
63 adding file changes
64 added 2 changesets with 2 changes to 2 files (+1 heads)
64 added 2 changesets with 2 changes to 2 files (+1 heads)
65 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
65 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
66 (run 'hg heads' to see heads, 'hg merge' to merge)
66 (run 'hg heads' to see heads, 'hg merge' to merge)
67 $ hg up 'desc(C0)'
67 $ hg up 'desc(C0)'
68 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
68 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69 $ mkcommit A1
69 $ mkcommit A1
70 $ hg up 0
70 $ hg up 0
71 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
71 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
72 $ mkcommit B1
72 $ mkcommit B1
73 created new head
73 created new head
74 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
74 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
75 1 new obsolescence markers
75 1 new obsolescence markers
76 obsoleted 1 changesets
76 obsoleted 1 changesets
77 1 new orphan changesets
77 1 new orphan changesets
78 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
78 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
79 1 new obsolescence markers
79 1 new obsolescence markers
80 obsoleted 1 changesets
80 obsoleted 1 changesets
81 $ hg log -G --hidden
81 $ hg log -G --hidden
82 @ 25c56d33e4c4 (draft): B1
82 @ 25c56d33e4c4 (draft): B1
83 |
83 |
84 | o a0802eb7fc1b (draft): A1
84 | o a0802eb7fc1b (draft): A1
85 | |
85 | |
86 | o 0f88766e02d6 (draft): C0
86 | o 0f88766e02d6 (draft): C0
87 |/
87 |/
88 | x d73caddc5533 (draft): B0
88 | x d73caddc5533 (draft): B0
89 | |
89 | |
90 | x 8aaa48160adc (draft): A0
90 | x 8aaa48160adc (draft): A0
91 |/
91 |/
92 o 1e4be0697311 (public): root
92 o 1e4be0697311 (public): root
93
93
94
94
95 Actual testing
95 Actual testing
96 --------------
96 --------------
97
97
98 $ hg push --rev 'desc(B1)'
98 $ hg push --rev 'desc(B1)'
99 pushing to $TESTTMP/D5/server
99 pushing to $TESTTMP/D5/server
100 searching for changes
100 searching for changes
101 abort: push creates new remote head 25c56d33e4c4
101 abort: push creates new remote head 25c56d33e4c4
102 (merge or see 'hg help push' for details about pushing new heads)
102 (merge or see 'hg help push' for details about pushing new heads)
103 [20]
103 [20]
104 $ hg push --rev 'desc(A1)'
104 $ hg push --rev 'desc(A1)'
105 pushing to $TESTTMP/D5/server
105 pushing to $TESTTMP/D5/server
106 searching for changes
106 searching for changes
107 adding changesets
107 adding changesets
108 adding manifests
108 adding manifests
109 adding file changes
109 adding file changes
110 added 1 changesets with 1 changes to 1 files
110 added 1 changesets with 1 changes to 1 files
111 1 new obsolescence markers
111 1 new obsolescence markers
112 obsoleted 1 changesets
112 obsoleted 1 changesets
113 1 new orphan changesets
113 1 new orphan changesets
114
114
115 $ cd ../..
115 $ cd ../..
General Comments 0
You need to be logged in to leave comments. Login now