Mercurial > evolve
comparison tests/test-touch.t @ 6004:3fdfeca7e45f mercurial-4.9
test-compat: merge mercurial-5.0 into mercurial-4.9
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 12 Aug 2021 22:01:08 +0200 |
parents | 4a09e95d29c9 |
children | 5c921c26dc40 |
comparison
equal
deleted
inserted
replaced
5946:200df6f9597f | 6004:3fdfeca7e45f |
---|---|
210 A a | 210 A a |
211 A b | 211 A b |
212 | 212 |
213 $ cd .. | 213 $ cd .. |
214 | 214 |
215 Check that touching a merge commit doesn't lose file changes (issue 6416) | |
216 | |
217 $ hg init issue-6416 | |
218 $ cd issue-6416 | |
219 $ echo base > base | |
220 $ hg ci -Aqm base | |
221 $ echo left1 > left1 | |
222 $ hg ci -Aqm left1 | |
223 $ echo left2 > left2 | |
224 $ hg ci -Aqm left2 | |
225 $ hg up 0 -q | |
226 $ echo right1 > right1 | |
227 $ hg ci -Aqm right1 | |
228 $ echo right2 > right2 | |
229 $ hg ci -Aqm right2 | |
230 $ hg up 2 -q | |
231 $ hg merge 4 -q | |
232 $ hg ci -m merge | |
233 $ hg touch tip | |
234 $ hg glog --hidden | |
235 @ 6: merge | |
236 |\ | |
237 +---x 5: merge | |
238 | |/ | |
239 | o 4: right2 | |
240 | | | |
241 | o 3: right1 | |
242 | | | |
243 o | 2: left2 | |
244 | | | |
245 o | 1: left1 | |
246 |/ | |
247 o 0: base | |
248 | |
249 $ hg glog --hidden --rev 'min(desc("merge"))' --rev 'max(desc("merge"))' | |
250 @ 6: merge | |
251 |\ | |
252 ~ ~ | |
253 x 5: merge | |
254 |\ | |
255 ~ ~ | |
256 $ hg status --hidden --change 'min(desc("merge"))' | |
257 A right1 | |
258 A right2 | |
259 $ hg status --hidden --change 'max(desc("merge"))' | |
260 A right1 | |
261 A right2 | |
262 $ hg status --hidden --rev 'min(desc("merge"))' --rev 'max(desc("merge"))' | |
263 $ cd .. | |
264 | |
265 Check that touching a merge commit doesn't lose copies | |
266 | |
267 $ hg init merge-copies | |
268 $ cd merge-copies | |
269 $ echo base > base | |
270 $ hg ci -Aqm base | |
271 $ echo left > left | |
272 $ hg cp base copy-on-left | |
273 $ hg ci -Aqm left | |
274 $ hg up 0 -q | |
275 $ echo right > right | |
276 $ hg cp base copy-on-right | |
277 $ hg ci -Aqm right | |
278 $ hg up 1 -q | |
279 $ hg merge 2 -q | |
280 $ hg cp left merge-copy-left | |
281 $ hg cp right merge-copy-right | |
282 $ hg ci -m merge | |
283 $ hg touch tip | |
284 $ hg glog --hidden | |
285 @ 4: merge | |
286 |\ | |
287 +---x 3: merge | |
288 | |/ | |
289 | o 2: right | |
290 | | | |
291 o | 1: left | |
292 |/ | |
293 o 0: base | |
294 | |
295 $ hg glog --hidden --rev 'min(desc("merge"))' --rev 'max(desc("merge"))' | |
296 @ 4: merge | |
297 |\ | |
298 ~ ~ | |
299 x 3: merge | |
300 |\ | |
301 ~ ~ | |
302 $ hg status --copies --rev 'min(desc("base"))' --rev 'min(desc("merge"))' | |
303 A copy-on-left | |
304 base | |
305 A copy-on-right | |
306 base | |
307 A left | |
308 A merge-copy-left | |
309 A merge-copy-right | |
310 A right | |
311 $ hg status --copies --rev 'min(desc("base"))' --rev 'max(desc("merge"))' | |
312 A copy-on-left | |
313 base | |
314 A copy-on-right | |
315 base | |
316 A left | |
317 A merge-copy-left | |
318 A merge-copy-right | |
319 A right | |
320 $ hg status --copies --rev 'min(desc("left"))' --rev 'min(desc("merge"))' | |
321 M copy-on-left | |
322 A copy-on-right | |
323 base | |
324 A merge-copy-left | |
325 left | |
326 A merge-copy-right | |
327 A right | |
328 $ hg status --copies --rev 'min(desc("left"))' --rev 'max(desc("merge"))' | |
329 M copy-on-left | |
330 A copy-on-right | |
331 base | |
332 A merge-copy-left | |
333 left | |
334 A merge-copy-right | |
335 A right | |
336 $ hg status --copies --rev 'min(desc("right"))' --rev 'min(desc("merge"))' | |
337 M copy-on-right | |
338 A copy-on-left | |
339 base | |
340 A left | |
341 A merge-copy-left | |
342 A merge-copy-right | |
343 right | |
344 $ hg status --copies --rev 'min(desc("right"))' --rev 'max(desc("merge"))' | |
345 M copy-on-right | |
346 A copy-on-left | |
347 base | |
348 A left | |
349 A merge-copy-left | |
350 A merge-copy-right | |
351 right | |
352 $ cd .. | |
353 | |
215 Make sure touch doesn't fail to warn about divergence (issue6107) | 354 Make sure touch doesn't fail to warn about divergence (issue6107) |
216 | 355 |
217 $ hg init touchdiv | 356 $ hg init touchdiv |
218 $ cd touchdiv | 357 $ cd touchdiv |
219 $ echo c > c | 358 $ echo c > c |
234 | 373 |
235 $ hg touch -r "desc('modified c')" --hidden -A | 374 $ hg touch -r "desc('modified c')" --hidden -A |
236 1 new content-divergent changesets | 375 1 new content-divergent changesets |
237 | 376 |
238 $ cd .. | 377 $ cd .. |
378 | |
379 Touch preserves copies | |
380 | |
381 $ hg init copies | |
382 $ cd copies | |
383 $ echo a > a | |
384 $ hg ci -Aqm a | |
385 $ hg cp a b | |
386 $ hg ci -Aqm 'copy a to b' | |
387 $ hg status --copies --change . | |
388 A b | |
389 a | |
390 $ hg touch | |
391 $ hg status --copies --change . | |
392 A b | |
393 a | |
394 $ cd .. |