Mercurial > evolve
comparison tests/test-topic-dest.t @ 1891:077c40f206d1
rebase: test default rebase destination behavior
In future mercurial 3.8, rebase and merge share the same destination logic. So
if merge work, rebase should work as well. However, we double test it to be
sure.
Especially, in 3.7 the logic is not shared so we have to introduce an extra hack
to share it in this case.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sun, 13 Mar 2016 13:07:54 +0000 |
parents | d49f75eab6a3 |
children | b1fadc089b82 |
comparison
equal
deleted
inserted
replaced
1890:e846b8f402d0 | 1891:077c40f206d1 |
---|---|
94 $ hg log -r 'ngtip(.)' | 94 $ hg log -r 'ngtip(.)' |
95 6 () c_epsilon | 95 6 () c_epsilon |
96 $ hg log -r 'default' | 96 $ hg log -r 'default' |
97 6 () c_epsilon | 97 6 () c_epsilon |
98 | 98 |
99 rebase destination | |
100 ================== | |
101 | |
102 rebase on branch ngtip | |
103 | |
104 $ hg up elephant | |
105 switching to topic elephant | |
106 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
107 $ hg rebase | |
108 rebasing 4:cb7ae72f4a80 "babar" | |
109 $ hg log -G | |
110 @ 7 (elephant) babar | |
111 | | |
112 o 6 () c_epsilon | |
113 | | |
114 | o 5 (monkey) zephir | |
115 | | | |
116 o | 3 () c_delta | |
117 | | | |
118 o | 2 () c_gamma | |
119 |/ | |
120 o 1 () c_beta | |
121 | | |
122 o 0 () c_alpha | |
123 | |
124 $ hg up monkey | |
125 switching to topic monkey | |
126 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
127 $ hg rebase | |
128 rebasing 5:d832ddc604ec "zephir" | |
129 $ hg log -G | |
130 @ 8 (monkey) zephir | |
131 | | |
132 | o 7 (elephant) babar | |
133 |/ | |
134 o 6 () c_epsilon | |
135 | | |
136 o 3 () c_delta | |
137 | | |
138 o 2 () c_gamma | |
139 | | |
140 o 1 () c_beta | |
141 | | |
142 o 0 () c_alpha | |
143 | |
144 | |
145 Rebase on other topic heads if any | |
146 | |
147 $ hg up 'desc(c_delta)' | |
148 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
149 $ echo "General Huc" >> monkeyville | |
150 $ hg add monkeyville | |
151 $ hg ci -t monkey -m Huc | |
152 created new head | |
153 $ hg log -G | |
154 @ 9 (monkey) Huc | |
155 | | |
156 | o 8 (monkey) zephir | |
157 | | | |
158 | | o 7 (elephant) babar | |
159 | |/ | |
160 | o 6 () c_epsilon | |
161 |/ | |
162 o 3 () c_delta | |
163 | | |
164 o 2 () c_gamma | |
165 | | |
166 o 1 () c_beta | |
167 | | |
168 o 0 () c_alpha | |
169 | |
170 $ hg rebase | |
171 rebasing 9:d79a104e2902 "Huc" (tip) | |
172 $ hg log -G | |
173 @ 10 (monkey) Huc | |
174 | | |
175 o 8 (monkey) zephir | |
176 | | |
177 | o 7 (elephant) babar | |
178 |/ | |
179 o 6 () c_epsilon | |
180 | | |
181 o 3 () c_delta | |
182 | | |
183 o 2 () c_gamma | |
184 | | |
185 o 1 () c_beta | |
186 | | |
187 o 0 () c_alpha | |
188 | |
189 | |
99 merge destination | 190 merge destination |
100 ================= | 191 ================= |
101 | 192 |
102 $ hg up 'ngtip(default)' | 193 $ hg up 'ngtip(default)' |
103 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 194 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
104 $ hg up default | 195 $ hg up default |
105 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 196 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
106 $ echo zeta >> zeta | 197 $ echo zeta >> zeta |
107 $ hg add zeta | 198 $ hg add zeta |
108 $ hg ci -m "c_zeta" | 199 $ hg ci -m "c_zeta" |
109 $ hg log -G | 200 $ hg log -G |
110 @ 7 () c_zeta | 201 @ 11 () c_zeta |
111 | | 202 | |
112 o 6 () c_epsilon | 203 | o 10 (monkey) Huc |
113 | | 204 | | |
114 | o 5 (monkey) zephir | 205 | o 8 (monkey) zephir |
115 | | | 206 |/ |
116 +---o 4 (elephant) babar | 207 | o 7 (elephant) babar |
117 | | | 208 |/ |
118 o | 3 () c_delta | 209 o 6 () c_epsilon |
119 | | | 210 | |
120 o | 2 () c_gamma | 211 o 3 () c_delta |
121 |/ | 212 | |
213 o 2 () c_gamma | |
214 | | |
122 o 1 () c_beta | 215 o 1 () c_beta |
123 | | 216 | |
124 o 0 () c_alpha | 217 o 0 () c_alpha |
125 | 218 |
126 $ hg up elephant | 219 $ hg up elephant |
127 switching to topic elephant | 220 switching to topic elephant |
128 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | 221 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
129 $ hg rebase -d 7 # make sure tip is elsewhere | 222 $ hg rebase -d 'desc(c_zeta)' # make sure tip is elsewhere |
130 rebasing 4:cb7ae72f4a80 "babar" | 223 rebasing 7:8d0b77140b05 "babar" |
131 $ hg up monkey | 224 $ hg up monkey |
132 switching to topic monkey | 225 switching to topic monkey |
133 1 files updated, 0 files merged, 4 files removed, 0 files unresolved | 226 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
134 $ hg merge | 227 $ hg merge |
135 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | 228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
136 (branch merge, don't forget to commit) | 229 (branch merge, don't forget to commit) |
137 $ hg topic | 230 $ hg topic |
138 elephant | 231 elephant |
139 * monkey | 232 * monkey |
140 $ hg ci -m 'merge with default' | 233 $ hg ci -m 'merge with default' |
141 $ hg topic | 234 $ hg topic |
142 elephant | 235 elephant |
143 * monkey | 236 * monkey |
144 $ hg log -G | 237 $ hg log -G |
145 @ 9 (monkey) merge with default | 238 @ 13 (monkey) merge with default |
146 |\ | 239 |\ |
147 | | o 8 (elephant) babar | 240 | | o 12 (elephant) babar |
148 | |/ | 241 | |/ |
149 | o 7 () c_zeta | 242 | o 11 () c_zeta |
150 | | | 243 | | |
151 | o 6 () c_epsilon | 244 o | 10 (monkey) Huc |
152 | | | 245 | | |
153 o | 5 (monkey) zephir | 246 o | 8 (monkey) zephir |
154 | | | 247 |/ |
155 | o 3 () c_delta | 248 o 6 () c_epsilon |
156 | | | 249 | |
157 | o 2 () c_gamma | 250 o 3 () c_delta |
158 |/ | 251 | |
159 o 1 () c_beta | 252 o 2 () c_gamma |
160 | | 253 | |
161 o 0 () c_alpha | 254 o 1 () c_beta |
162 | 255 | |
256 o 0 () c_alpha | |
257 |