Show More
@@ -0,0 +1,82 b'' | |||
|
1 | ==================================== | |
|
2 | Testing head checking code: Case C-2 | |
|
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 C: checking case were the branch is only partially obsoleted. | |
|
12 | TestCase 1: 2 changeset branch, only the head is rewritten | |
|
13 | ||
|
14 | .. old-state: | |
|
15 | .. | |
|
16 | .. * 2 changeset branch | |
|
17 | .. | |
|
18 | .. new-state: | |
|
19 | .. | |
|
20 | .. * 1 new changesets branches superceeding only the head of the old one | |
|
21 | .. * base of the old branch is still alive | |
|
22 | .. | |
|
23 | .. expected-result: | |
|
24 | .. | |
|
25 | .. * push denied | |
|
26 | .. | |
|
27 | .. graph-summary: | |
|
28 | .. | |
|
29 | .. B ø⇠◔ B' | |
|
30 | .. | | | |
|
31 | .. A ○ | | |
|
32 | .. |/ | |
|
33 | .. ○ | |
|
34 | ||
|
35 | $ . $TESTDIR/testlib/push-checkheads-util.sh | |
|
36 | ||
|
37 | Test setup | |
|
38 | ---------- | |
|
39 | ||
|
40 | $ mkdir C1 | |
|
41 | $ cd C1 | |
|
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 server | |
|
47 | $ mkcommit B0 | |
|
48 | $ cd ../client | |
|
49 | $ hg pull | |
|
50 | pulling from $TESTTMP/C1/server (glob) | |
|
51 | searching for changes | |
|
52 | adding changesets | |
|
53 | adding manifests | |
|
54 | adding file changes | |
|
55 | added 1 changesets with 1 changes to 1 files | |
|
56 | (run 'hg update' to get a working copy) | |
|
57 | $ hg up 0 | |
|
58 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
59 | $ mkcommit B1 | |
|
60 | created new head | |
|
61 | $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` | |
|
62 | $ hg log -G --hidden | |
|
63 | @ 25c56d33e4c4 (draft): B1 | |
|
64 | | | |
|
65 | | x d73caddc5533 (draft): B0 | |
|
66 | | | | |
|
67 | | o 8aaa48160adc (draft): A0 | |
|
68 | |/ | |
|
69 | o 1e4be0697311 (public): root | |
|
70 | ||
|
71 | ||
|
72 | Actual testing | |
|
73 | -------------- | |
|
74 | ||
|
75 | $ hg push | |
|
76 | pushing to $TESTTMP/C1/server (glob) | |
|
77 | searching for changes | |
|
78 | abort: push creates new remote head 25c56d33e4c4! | |
|
79 | (merge or see 'hg help push' for details about pushing new heads) | |
|
80 | [255] | |
|
81 | ||
|
82 | $ cd ../.. |
General Comments 0
You need to be logged in to leave comments.
Login now