comparison tests/test-bookmarks.t @ 19523:f37b5a17e6a0 stable 2.7

bookmarks: pull --update updates to active bookmark if it moved (issue4007) This makes `hg pull --update` behave the same wrt the active bookmark as `hg pull && hg update` does as of 2096e025a728. A helper function, bookmarks.calculateupdate, is added to prevent code duplication between postincoming and update.
author Kevin Bullock <kbullock@ringworld.org>
date Thu, 01 Aug 2013 21:43:14 -0500
parents 5b1835485442
children aa9385f983fa
comparison
equal deleted inserted replaced
19522:3d19b8136641 19523:f37b5a17e6a0
505 X2 1:925d80f479bb 505 X2 1:925d80f479bb
506 Y 2:db815d6d32e6 506 Y 2:db815d6d32e6
507 * Z 3:125c9a1d6df6 507 * Z 3:125c9a1d6df6
508 x y 2:db815d6d32e6 508 x y 2:db815d6d32e6
509 509
510 pull --update works the same as pull && update
511
512 $ hg bookmark -r3 Y
513 moving bookmark 'Y' forward from db815d6d32e6
514 $ hg -R cloned-bookmarks-update update Y
515 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
516 $ hg -R cloned-bookmarks-update pull --update .
517 pulling from .
518 searching for changes
519 adding changesets
520 adding manifests
521 adding file changes
522 added 2 changesets with 2 changes to 2 files (+1 heads)
523 updating bookmark Y
524 updating bookmark Z
525 updating to active bookmark Y
526 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
527
510 test wrongly formated bookmark 528 test wrongly formated bookmark
511 529
512 $ echo '' >> .hg/bookmarks 530 $ echo '' >> .hg/bookmarks
513 $ hg bookmarks 531 $ hg bookmarks
514 X2 1:925d80f479bb 532 X2 1:925d80f479bb
515 Y 2:db815d6d32e6 533 Y 3:125c9a1d6df6
516 * Z 3:125c9a1d6df6 534 * Z 3:125c9a1d6df6
517 x y 2:db815d6d32e6 535 x y 2:db815d6d32e6
518 $ echo "Ican'thasformatedlines" >> .hg/bookmarks 536 $ echo "Ican'thasformatedlines" >> .hg/bookmarks
519 $ hg bookmarks 537 $ hg bookmarks
520 malformed line in .hg/bookmarks: "Ican'thasformatedlines" 538 malformed line in .hg/bookmarks: "Ican'thasformatedlines"
521 X2 1:925d80f479bb 539 X2 1:925d80f479bb
522 Y 2:db815d6d32e6 540 Y 3:125c9a1d6df6
523 * Z 3:125c9a1d6df6 541 * Z 3:125c9a1d6df6
524 x y 2:db815d6d32e6 542 x y 2:db815d6d32e6
525 543
526 test missing revisions 544 test missing revisions
527 545