##// END OF EJS Templates
hg: perform update after pulling during clone with share (issue5103)...
Gregory Szorc -
r28202:a4692267 default
parent child Browse files
Show More
@@ -356,7 +356,7 b' def clonewithshare(ui, peeropts, sharepa'
356 rev=rev, update=False, stream=stream)
356 rev=rev, update=False, stream=stream)
357
357
358 sharerepo = repository(ui, path=sharepath)
358 sharerepo = repository(ui, path=sharepath)
359 share(ui, sharerepo, dest=dest, update=update, bookmarks=False)
359 share(ui, sharerepo, dest=dest, update=False, bookmarks=False)
360
360
361 # We need to perform a pull against the dest repo to fetch bookmarks
361 # We need to perform a pull against the dest repo to fetch bookmarks
362 # and other non-store data that isn't shared by default. In the case of
362 # and other non-store data that isn't shared by default. In the case of
@@ -366,6 +366,8 b' def clonewithshare(ui, peeropts, sharepa'
366 destrepo = repository(ui, path=dest)
366 destrepo = repository(ui, path=dest)
367 exchange.pull(destrepo, srcpeer, heads=revs)
367 exchange.pull(destrepo, srcpeer, heads=revs)
368
368
369 _postshareupdate(destrepo, update)
370
369 return srcpeer, peer(ui, peeropts, dest)
371 return srcpeer, peer(ui, peeropts, dest)
370
372
371 def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
373 def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
@@ -774,11 +774,11 b' Clone from repo with content should resu'
774 adding manifests
774 adding manifests
775 adding file changes
775 adding file changes
776 added 3 changesets with 3 changes to 1 files
776 added 3 changesets with 3 changes to 1 files
777 updating working directory
778 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
779 searching for changes
777 searching for changes
780 no changes found
778 no changes found
781 adding remote bookmark bookA
779 adding remote bookmark bookA
780 updating working directory
781 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
782
782
783 The shared repo should have been created
783 The shared repo should have been created
784
784
@@ -804,8 +804,6 b' Clone with existing share dir should res'
804
804
805 $ hg --config share.pool=share clone source1b share-dest1b
805 $ hg --config share.pool=share clone source1b share-dest1b
806 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
806 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
807 updating working directory
808 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
809 searching for changes
807 searching for changes
810 adding changesets
808 adding changesets
811 adding manifests
809 adding manifests
@@ -813,6 +811,8 b' Clone with existing share dir should res'
813 added 4 changesets with 4 changes to 1 files (+4 heads)
811 added 4 changesets with 4 changes to 1 files (+4 heads)
814 adding remote bookmark head1
812 adding remote bookmark head1
815 adding remote bookmark head2
813 adding remote bookmark head2
814 updating working directory
815 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
816
816
817 $ ls share
817 $ ls share
818 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
818 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
@@ -831,6 +831,17 b' Default path should be source, not share'
831 $ hg -R share-dest1b config paths.default
831 $ hg -R share-dest1b config paths.default
832 $TESTTMP/source1a (glob)
832 $TESTTMP/source1a (glob)
833
833
834 Checked out revision should be head of default branch
835
836 $ hg -R share-dest1b log -r .
837 changeset: 4:99f71071f117
838 bookmark: head2
839 parent: 0:b5f04eac9d8f
840 user: test
841 date: Thu Jan 01 00:00:00 1970 +0000
842 summary: head2
843
844
834 Clone from unrelated repo should result in new share
845 Clone from unrelated repo should result in new share
835
846
836 $ hg --config share.pool=share clone source2 share-dest2
847 $ hg --config share.pool=share clone source2 share-dest2
@@ -840,10 +851,10 b' Clone from unrelated repo should result '
840 adding manifests
851 adding manifests
841 adding file changes
852 adding file changes
842 added 2 changesets with 2 changes to 1 files
853 added 2 changesets with 2 changes to 1 files
854 searching for changes
855 no changes found
843 updating working directory
856 updating working directory
844 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
857 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
845 searching for changes
846 no changes found
847
858
848 $ ls share
859 $ ls share
849 22aeff664783fd44c6d9b435618173c118c3448e
860 22aeff664783fd44c6d9b435618173c118c3448e
@@ -858,11 +869,11 b' remote naming mode works as advertised'
858 adding manifests
869 adding manifests
859 adding file changes
870 adding file changes
860 added 3 changesets with 3 changes to 1 files
871 added 3 changesets with 3 changes to 1 files
861 updating working directory
862 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
863 searching for changes
872 searching for changes
864 no changes found
873 no changes found
865 adding remote bookmark bookA
874 adding remote bookmark bookA
875 updating working directory
876 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
866
877
867 $ ls shareremote
878 $ ls shareremote
868 195bb1fcdb595c14a6c13e0269129ed78f6debde
879 195bb1fcdb595c14a6c13e0269129ed78f6debde
@@ -874,12 +885,12 b' remote naming mode works as advertised'
874 adding manifests
885 adding manifests
875 adding file changes
886 adding file changes
876 added 6 changesets with 6 changes to 1 files (+4 heads)
887 added 6 changesets with 6 changes to 1 files (+4 heads)
877 updating working directory
878 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
879 searching for changes
888 searching for changes
880 no changes found
889 no changes found
881 adding remote bookmark head1
890 adding remote bookmark head1
882 adding remote bookmark head2
891 adding remote bookmark head2
892 updating working directory
893 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
883
894
884 $ ls shareremote
895 $ ls shareremote
885 195bb1fcdb595c14a6c13e0269129ed78f6debde
896 195bb1fcdb595c14a6c13e0269129ed78f6debde
@@ -893,10 +904,10 b' request to clone a single revision is re'
893 adding manifests
904 adding manifests
894 adding file changes
905 adding file changes
895 added 2 changesets with 2 changes to 1 files
906 added 2 changesets with 2 changes to 1 files
907 no changes found
908 adding remote bookmark head1
896 updating working directory
909 updating working directory
897 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
910 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
898 no changes found
899 adding remote bookmark head1
900
911
901 $ hg -R share-1arev log -G
912 $ hg -R share-1arev log -G
902 @ changeset: 1:4a8dc1ab4c13
913 @ changeset: 1:4a8dc1ab4c13
@@ -916,8 +927,6 b' making another clone should only pull do'
916
927
917 $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
928 $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
918 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
929 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
919 updating working directory
920 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
921 searching for changes
930 searching for changes
922 adding changesets
931 adding changesets
923 adding manifests
932 adding manifests
@@ -925,9 +934,11 b' making another clone should only pull do'
925 added 1 changesets with 1 changes to 1 files (+1 heads)
934 added 1 changesets with 1 changes to 1 files (+1 heads)
926 adding remote bookmark head1
935 adding remote bookmark head1
927 adding remote bookmark head2
936 adding remote bookmark head2
937 updating working directory
938 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
928
939
929 $ hg -R share-1brev log -G
940 $ hg -R share-1brev log -G
930 o changeset: 2:99f71071f117
941 @ changeset: 2:99f71071f117
931 | bookmark: head2
942 | bookmark: head2
932 | tag: tip
943 | tag: tip
933 | parent: 0:b5f04eac9d8f
944 | parent: 0:b5f04eac9d8f
@@ -935,7 +946,7 b' making another clone should only pull do'
935 | date: Thu Jan 01 00:00:00 1970 +0000
946 | date: Thu Jan 01 00:00:00 1970 +0000
936 | summary: head2
947 | summary: head2
937 |
948 |
938 | @ changeset: 1:4a8dc1ab4c13
949 | o changeset: 1:4a8dc1ab4c13
939 |/ bookmark: head1
950 |/ bookmark: head1
940 | user: test
951 | user: test
941 | date: Thu Jan 01 00:00:00 1970 +0000
952 | date: Thu Jan 01 00:00:00 1970 +0000
@@ -955,9 +966,9 b' Request to clone a single branch is resp'
955 adding manifests
966 adding manifests
956 adding file changes
967 adding file changes
957 added 2 changesets with 2 changes to 1 files
968 added 2 changesets with 2 changes to 1 files
969 no changes found
958 updating working directory
970 updating working directory
959 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
971 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
960 no changes found
961
972
962 $ hg -R share-1bbranch1 log -G
973 $ hg -R share-1bbranch1 log -G
963 o changeset: 1:5f92a6c1a1b1
974 o changeset: 1:5f92a6c1a1b1
@@ -975,13 +986,13 b' Request to clone a single branch is resp'
975
986
976 $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
987 $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
977 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
988 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
978 updating working directory
979 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
980 searching for changes
989 searching for changes
981 adding changesets
990 adding changesets
982 adding manifests
991 adding manifests
983 adding file changes
992 adding file changes
984 added 1 changesets with 1 changes to 1 files (+1 heads)
993 added 1 changesets with 1 changes to 1 files (+1 heads)
994 updating working directory
995 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
985
996
986 $ hg -R share-1bbranch2 log -G
997 $ hg -R share-1bbranch2 log -G
987 o changeset: 2:6bacf4683960
998 o changeset: 2:6bacf4683960
General Comments 0
You need to be logged in to leave comments. Login now