##// END OF EJS Templates
tests: merging bookmarked heads...
John Li -
r17394:19e4861f stable
parent child Browse files
Show More
@@ -1,93 +1,128 b''
1 # init
1 # init
2
2
3 $ hg init
3 $ hg init
4 $ echo a > a
4 $ echo a > a
5 $ hg add a
5 $ hg add a
6 $ hg commit -m'a'
6 $ hg commit -m'a'
7 $ echo b > b
7 $ echo b > b
8 $ hg add b
8 $ hg add b
9 $ hg commit -m'b'
9 $ hg commit -m'b'
10 $ hg up -C 0
10 $ hg up -C 0
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
12 $ echo c > c
12 $ echo c > c
13 $ hg add c
13 $ hg add c
14 $ hg commit -m'c'
14 $ hg commit -m'c'
15 created new head
15 created new head
16
16
17 # test merging of diverged bookmarks
17 # test merging of diverged bookmarks
18 $ hg bookmark -r 1 "c@diverge"
18 $ hg bookmark -r 1 "c@diverge"
19 $ hg bookmark -r 1 b
19 $ hg bookmark -r 1 b
20 $ hg bookmark c
20 $ hg bookmark c
21 $ hg bookmarks
21 $ hg bookmarks
22 b 1:d2ae7f538514
22 b 1:d2ae7f538514
23 * c 2:d36c0562f908
23 * c 2:d36c0562f908
24 c@diverge 1:d2ae7f538514
24 c@diverge 1:d2ae7f538514
25 $ hg merge "c@diverge"
25 $ hg merge "c@diverge"
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 (branch merge, don't forget to commit)
27 (branch merge, don't forget to commit)
28 $ hg commit -m'merge'
28 $ hg commit -m'merge'
29 $ hg bookmarks
29 $ hg bookmarks
30 b 1:d2ae7f538514
30 b 1:d2ae7f538514
31 * c 3:b8f96cf4688b
31 * c 3:b8f96cf4688b
32
32
33 $ hg up -C 3
33 $ hg up -C 3
34 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 $ echo d > d
35 $ echo d > d
36 $ hg add d
36 $ hg add d
37 $ hg commit -m'd'
37 $ hg commit -m'd'
38
38
39 $ hg up -C 3
39 $ hg up -C 3
40 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
40 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
41 $ echo e > e
41 $ echo e > e
42 $ hg add e
42 $ hg add e
43 $ hg commit -m'e'
43 $ hg commit -m'e'
44 created new head
44 created new head
45 $ hg up -C 5
45 $ hg up -C 5
46 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 $ hg bookmark e
47 $ hg bookmark e
48 $ hg bookmarks
48 $ hg bookmarks
49 b 1:d2ae7f538514
49 b 1:d2ae7f538514
50 c 3:b8f96cf4688b
50 c 3:b8f96cf4688b
51 * e 5:26bee9c5bcf3
51 * e 5:26bee9c5bcf3
52
52
53 # the picked side is bookmarked
53 # the picked side is bookmarked
54
54
55 $ hg up -C 4
55 $ hg up -C 4
56 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
56 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
57 $ hg merge
57 $ hg merge
58 abort: heads are bookmarked - please merge with an explicit rev
58 abort: heads are bookmarked - please merge with an explicit rev
59 (run 'hg heads' to see all heads)
59 (run 'hg heads' to see all heads)
60 [255]
60 [255]
61
61
62 # our revision is bookmarked
62 # our revision is bookmarked
63
63
64 $ hg up -C e
64 $ hg up -C e
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 $ hg merge
66 $ hg merge
67 abort: no matching bookmark to merge - please merge with an explicit rev or bookmark
67 abort: no matching bookmark to merge - please merge with an explicit rev or bookmark
68 (run 'hg heads' to see all heads)
68 (run 'hg heads' to see all heads)
69 [255]
69 [255]
70
70
71 # merge bookmark heads
71 # merge bookmark heads
72
72
73 $ hg up -C 4
73 $ hg up -C 4
74 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
74 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
75 $ echo f > f
75 $ echo f > f
76 $ hg commit -Am "f"
76 $ hg commit -Am "f"
77 adding f
77 adding f
78 $ hg up -C e
78 $ hg up -C e
79 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
79 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
80 $ hg bookmarks -r 4 "e@diverged"
80 $ hg bookmarks -r 4 "e@diverged"
81 $ hg bookmarks
81 $ hg bookmarks
82 b 1:d2ae7f538514
82 b 1:d2ae7f538514
83 c 3:b8f96cf4688b
83 c 3:b8f96cf4688b
84 * e 5:26bee9c5bcf3
84 * e 5:26bee9c5bcf3
85 e@diverged 4:a0546fcfe0fb
85 e@diverged 4:a0546fcfe0fb
86 $ hg merge
86 $ hg merge
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 (branch merge, don't forget to commit)
88 (branch merge, don't forget to commit)
89 $ hg commit -m'merge'
89 $ hg commit -m'merge'
90 $ hg bookmarks
90 $ hg bookmarks
91 b 1:d2ae7f538514
91 b 1:d2ae7f538514
92 c 3:b8f96cf4688b
92 c 3:b8f96cf4688b
93 * e 7:ca784329f0ba
93 * e 7:ca784329f0ba
94
95 # test warning when all heads are inactive bookmarks
96
97 $ hg up -C 6
98 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
99 $ echo g > g
100 $ hg commit -Am 'g'
101 adding g
102 $ hg bookmark -i g
103 $ hg bookmarks
104 b 1:d2ae7f538514
105 c 3:b8f96cf4688b
106 e 7:ca784329f0ba
107 g 8:04dd21731d95
108 $ hg heads
109 changeset: 8:04dd21731d95
110 bookmark: g
111 tag: tip
112 parent: 6:be381d1126a0
113 user: test
114 date: Thu Jan 01 00:00:00 1970 +0000
115 summary: g
116
117 changeset: 7:ca784329f0ba
118 bookmark: e
119 parent: 5:26bee9c5bcf3
120 parent: 4:a0546fcfe0fb
121 user: test
122 date: Thu Jan 01 00:00:00 1970 +0000
123 summary: merge
124
125 $ hg merge
126 abort: heads are bookmarked - please merge with an explicit rev
127 (run 'hg heads' to see all heads)
128 [255]
General Comments 0
You need to be logged in to leave comments. Login now