191 hg -q branch -f b |
194 hg -q branch -f b |
192 hg -q ci -d '0 0' -mb2 |
195 hg -q ci -d '0 0' -mb2 |
193 hg -q merge 3 |
196 hg -q merge 3 |
194 hg -q ci -d '0 0' -mma |
197 hg -q ci -d '0 0' -mma |
195 hg push ../l -b b |
198 hg push ../l -b b |
|
199 cd .. |
|
200 |
|
201 echo % check prepush with new branch head on former topo non-head |
|
202 hg init n |
|
203 cd n |
|
204 hg branch A |
|
205 echo a >a |
|
206 hg ci -Ama |
|
207 hg branch B |
|
208 echo b >b |
|
209 hg ci -Amb |
|
210 # b is now branch head of B, and a topological head |
|
211 # a is now branch head of A, but not a topological head |
|
212 hg clone . inner |
|
213 cd inner |
|
214 hg up B |
|
215 echo b1 >b1 |
|
216 hg ci -Amb1 |
|
217 # in the clone b1 is now the head of B |
|
218 cd .. |
|
219 hg up 0 |
|
220 echo a2 >a2 |
|
221 hg ci -Ama2 |
|
222 # a2 is now the new branch head of A, and a new topological head |
|
223 # it replaces a former inner branch head, so it should at most warn about A, not B |
|
224 echo %% glog of local |
|
225 hg glog --template "{rev}: {branches} {desc}\n" |
|
226 echo %% glog of remote |
|
227 hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
228 echo %% outgoing |
|
229 hg out inner --template "{rev}: {branches} {desc}\n" |
|
230 hg push inner |
|
231 cd .. |
|
232 |
|
233 echo % check prepush with new branch head on former topo head |
|
234 hg init o |
|
235 cd o |
|
236 hg branch A |
|
237 echo a >a |
|
238 hg ci -Ama |
|
239 hg branch B |
|
240 echo b >b |
|
241 hg ci -Amb |
|
242 # b is now branch head of B, and a topological head |
|
243 hg up 0 |
|
244 echo a1 >a1 |
|
245 hg ci -Ama1 |
|
246 # a1 is now branch head of A, and a topological head |
|
247 hg clone . inner |
|
248 cd inner |
|
249 hg up B |
|
250 echo b1 >b1 |
|
251 hg ci -Amb1 |
|
252 # in the clone b1 is now the head of B |
|
253 cd .. |
|
254 echo a2 >a2 |
|
255 hg ci -Ama2 |
|
256 # a2 is now the new branch head of A, and a topological head |
|
257 # it replaces a former topological and branch head, so this should not warn |
|
258 echo %% glog of local |
|
259 hg glog --template "{rev}: {branches} {desc}\n" |
|
260 echo %% glog of remote |
|
261 hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
262 echo %% outgoing |
|
263 hg out inner --template "{rev}: {branches} {desc}\n" |
|
264 hg push inner |
|
265 cd .. |
196 |
266 |
197 exit 0 |
267 exit 0 |