Show More
@@ -5542,8 +5542,10 b' def postincoming(ui, repo, modheads, opt' | |||
|
5542 | 5542 | msg = _("not updating: %s") % str(inst) |
|
5543 | 5543 | hint = inst.hint |
|
5544 | 5544 | raise error.UpdateAbort(msg, hint=hint) |
|
5545 |
if not ret and |
|
|
5546 |
if |
|
|
5545 | if not ret and movemarkfrom: | |
|
5546 | if movemarkfrom == repo['.'].node(): | |
|
5547 | pass # no-op update | |
|
5548 | elif bookmarks.update(repo, [movemarkfrom], repo['.'].node()): | |
|
5547 | 5549 | ui.status(_("updating bookmark %s\n") % repo._activebookmark) |
|
5548 | 5550 | return ret |
|
5549 | 5551 | if modheads > 1: |
@@ -781,3 +781,61 b' test clearing only a single divergent bo' | |||
|
781 | 781 | foo@2 2:db815d6d32e6 |
|
782 | 782 | four 3:9ba5f110a0b3 |
|
783 | 783 | should-end-on-two 2:db815d6d32e6 |
|
784 | ||
|
785 | pull --update works the same as pull && update (case #2) | |
|
786 | ||
|
787 | It is assumed that "hg pull" itself doesn't update current active | |
|
788 | bookmark ('Y' in tests below). | |
|
789 | ||
|
790 | $ hg pull -q ../cloned-bookmarks-update | |
|
791 | divergent bookmark Z stored as Z@2 | |
|
792 | ||
|
793 | (pulling revision on another named branch with --update updates | |
|
794 | neither the working directory nor current active bookmark: "no-op" | |
|
795 | case) | |
|
796 | ||
|
797 | $ echo yy >> y | |
|
798 | $ hg commit -m yy | |
|
799 | ||
|
800 | $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' | |
|
801 | * Y 3:125c9a1d6df6 | |
|
802 | $ hg -R ../cloned-bookmarks-update pull . --update | |
|
803 | pulling from . | |
|
804 | searching for changes | |
|
805 | adding changesets | |
|
806 | adding manifests | |
|
807 | adding file changes | |
|
808 | added 1 changesets with 1 changes to 1 files | |
|
809 | divergent bookmark Z stored as Z@default | |
|
810 | adding remote bookmark foo | |
|
811 | adding remote bookmark four | |
|
812 | adding remote bookmark should-end-on-two | |
|
813 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
814 | $ hg -R ../cloned-bookmarks-update parents -T "{rev}:{node|short}\n" | |
|
815 | 3:125c9a1d6df6 | |
|
816 | $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' | |
|
817 | * Y 3:125c9a1d6df6 | |
|
818 | ||
|
819 | (pulling revision on current named/topological branch with --update | |
|
820 | updates the working directory and current active bookmark) | |
|
821 | ||
|
822 | $ hg update -C -q 125c9a1d6df6 | |
|
823 | $ echo xx >> x | |
|
824 | $ hg commit -m xx | |
|
825 | ||
|
826 | $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' | |
|
827 | * Y 3:125c9a1d6df6 | |
|
828 | $ hg -R ../cloned-bookmarks-update pull . --update | |
|
829 | pulling from . | |
|
830 | searching for changes | |
|
831 | adding changesets | |
|
832 | adding manifests | |
|
833 | adding file changes | |
|
834 | added 1 changesets with 1 changes to 1 files | |
|
835 | divergent bookmark Z stored as Z@default | |
|
836 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
837 | updating bookmark Y | |
|
838 | $ hg -R ../cloned-bookmarks-update parents -T "{rev}:{node|short}\n" | |
|
839 | 6:81dcce76aa0b | |
|
840 | $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' | |
|
841 | * Y 6:81dcce76aa0b |
General Comments 0
You need to be logged in to leave comments.
Login now