Mercurial > hg
comparison tests/test-bundle.t @ 28714:dac81729fea4
bundle: warn when update to revision existing only in a bundle (issue5004)
Now its done silently, so unless user really knows what he is doing
will be suprised to find that after update 'hg status' doesn't work.
This commit makes also merge operation warns about missing parent when
revision to merge exists only in the bundle.
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Wed, 23 Mar 2016 08:55:22 +0100 |
parents | 645e78845383 |
children | 2e58dc022caa |
comparison
equal
deleted
inserted
replaced
28713:806d260c6f3b | 28714:dac81729fea4 |
---|---|
731 == Test bundling no commits | 731 == Test bundling no commits |
732 | 732 |
733 $ hg bundle -r 'public()' no-output.hg | 733 $ hg bundle -r 'public()' no-output.hg |
734 abort: no commits to bundle | 734 abort: no commits to bundle |
735 [255] | 735 [255] |
736 | |
737 $ cd .. | |
738 | |
739 When user merges to the revision existing only in the bundle, | |
740 it should show warning that second parent of the working | |
741 directory does not exist | |
742 | |
743 $ hg init update2bundled | |
744 $ cd update2bundled | |
745 $ cat <<EOF >> .hg/hgrc | |
746 > [extensions] | |
747 > strip = | |
748 > EOF | |
749 $ echo "aaa" >> a | |
750 $ hg commit -A -m 0 | |
751 adding a | |
752 $ echo "bbb" >> b | |
753 $ hg commit -A -m 1 | |
754 adding b | |
755 $ echo "ccc" >> c | |
756 $ hg commit -A -m 2 | |
757 adding c | |
758 $ hg update -r 1 | |
759 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
760 $ echo "ddd" >> d | |
761 $ hg commit -A -m 3 | |
762 adding d | |
763 created new head | |
764 $ hg update -r 2 | |
765 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
766 $ hg log -G | |
767 o changeset: 3:8bd3e1f196af | |
768 | tag: tip | |
769 | parent: 1:a01eca7af26d | |
770 | user: test | |
771 | date: Thu Jan 01 00:00:00 1970 +0000 | |
772 | summary: 3 | |
773 | | |
774 | @ changeset: 2:4652c276ac4f | |
775 |/ user: test | |
776 | date: Thu Jan 01 00:00:00 1970 +0000 | |
777 | summary: 2 | |
778 | | |
779 o changeset: 1:a01eca7af26d | |
780 | user: test | |
781 | date: Thu Jan 01 00:00:00 1970 +0000 | |
782 | summary: 1 | |
783 | | |
784 o changeset: 0:4fe08cd4693e | |
785 user: test | |
786 date: Thu Jan 01 00:00:00 1970 +0000 | |
787 summary: 0 | |
788 | |
789 $ hg bundle --base 1 -r 3 ../update2bundled.hg | |
790 1 changesets found | |
791 $ hg strip -r 3 | |
792 saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg (glob) | |
793 $ hg merge -R ../update2bundled.hg -r 3 | |
794 setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | |
795 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
796 (branch merge, don't forget to commit) | |
797 | |
798 When user updates to the revision existing only in the bundle, | |
799 it should show warning | |
800 | |
801 $ hg update -R ../update2bundled.hg --clean -r 3 | |
802 setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | |
803 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
804 | |
805 When user updates to the revision existing in the local repository | |
806 the warning shouldn't be emitted | |
807 | |
808 $ hg update -R ../update2bundled.hg -r 0 | |
809 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |