Mercurial > evolve
comparison tests/test-pick.t @ 4686:f1466f5ffbf5 stable
tests: demonstrate hg pick forgetting files after conflicts
This test currently passes to show that pick is behaving incorrectly.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 23 Dec 2018 01:02:36 +0800 |
parents | bdaf34903430 |
children | 313565dd75e3 |
comparison
equal
deleted
inserted
replaced
4685:5ca2da538689 | 4686:f1466f5ffbf5 |
---|---|
1 Test for the pick command | 1 Test for the pick command |
2 | 2 |
3 $ cat >> $HGRCPATH <<EOF | 3 $ cat >> $HGRCPATH <<EOF |
4 > [alias] | 4 > [alias] |
5 > glog = log -G -T "{rev}:{node|short} {desc}\n" | 5 > glog = log -G -T "{rev}:{node|short} {desc}\n" |
6 > glf = log -GT "{rev}: {desc} ({files})\n" | |
6 > [extensions] | 7 > [extensions] |
7 > EOF | 8 > EOF |
8 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH | 9 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
9 | 10 |
10 $ mkcommit() { | 11 $ mkcommit() { |
384 o 5f07cbf7d111: default | 385 o 5f07cbf7d111: default |
385 | | 386 | |
386 o d03a6bcc83cd: default | 387 o d03a6bcc83cd: default |
387 | 388 |
388 $ cd .. | 389 $ cd .. |
390 | |
391 Check that pick doesn't drop files after conflicts occur (issue6037) | |
392 -------------------------------------------------------------------- | |
393 | |
394 $ hg init issue6037 | |
395 $ cd issue6037 | |
396 | |
397 $ echo apple > a | |
398 $ hg ci -qAm 'apple' | |
399 | |
400 $ echo apricot > a | |
401 $ echo banana > b | |
402 $ hg ci -qAm 'apricot and banana' | |
403 | |
404 $ echo avocado > a | |
405 $ hg ci -m 'avocado' | |
406 | |
407 $ hg glf | |
408 @ 2: avocado (a) | |
409 | | |
410 o 1: apricot and banana (a b) | |
411 | | |
412 o 0: apple (a) | |
413 | |
414 Now let's change order of 1 and 2 using pick command | |
415 | |
416 $ hg up -r 0 | |
417 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
418 | |
419 We avoid merge conflict here just to make the test shorter | |
420 | |
421 $ hg pick -r 2 --tool :other | |
422 picking 2:f08a1e4a33c4 "avocado" | |
423 | |
424 Now we pick revision 1 that touches two files (a and b), merge conflict is expected | |
425 | |
426 $ hg pick -r 1 | |
427 picking 1:892e123ebf62 "apricot and banana" | |
428 merging a | |
429 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
430 unresolved merge conflicts (see hg help resolve) | |
431 [1] | |
432 $ hg resolve -t :other a | |
433 (no more unresolved files) | |
434 continue: hg pick --continue | |
435 $ hg pick --continue | |
436 | |
437 But what's this? b was forgotten and is not in the picked changeset! | |
438 | |
439 $ hg status b | |
440 ? b | |
441 $ hg glf | |
442 @ 4: apricot and banana (a) | |
443 | | |
444 o 3: avocado (a) | |
445 | | |
446 o 0: apple (a) | |
447 | |
448 $ cd .. |