691
)
692
'
693
694
+test_expect_success 'clone remote with master null bookmark, then push to the bookmark' '
695
+ test_when_finished "rm -rf gitrepo* hgrepo*" &&
696
+
697
+ hg init hgrepo &&
698
+ (
699
+ cd hgrepo &&
700
+ echo a >a &&
701
+ hg add a &&
702
+ hg commit -m a &&
703
+ hg bookmark -r null master
704
+ ) &&
705
+
706
+ git clone "hg::hgrepo" gitrepo &&
707
+ check gitrepo HEAD a &&
708
+ (
709
+ cd gitrepo &&
710
+ git checkout --quiet -b master &&
711
+ echo b >b &&
712
+ git add b &&
713
+ git commit -m b &&
714
+ git push origin master
715
+ )
716
+'
717
+
718
+test_expect_success 'clone remote with default null bookmark, then push to the bookmark' '
719
+ test_when_finished "rm -rf gitrepo* hgrepo*" &&
720
+
721
+ hg init hgrepo &&
722
+ (
723
+ cd hgrepo &&
724
+ echo a >a &&
725
+ hg add a &&
726
+ hg commit -m a &&
727
+ hg bookmark -r null -f default
728
+ ) &&
729
+
730
+ git clone "hg::hgrepo" gitrepo &&
731
+ check gitrepo HEAD a &&
732
+ (
733
+ cd gitrepo &&
734
+ git checkout --quiet -b default &&
735
+ echo b >b &&
736
+ git add b &&
737
+ git commit -m b &&
738
+ git push origin default
739
+ )
740
+'
741
+
742
+test_expect_success 'clone remote with generic null bookmark, then push to the bookmark' '
743
+ test_when_finished "rm -rf gitrepo* hgrepo*" &&
744
+
745
+ hg init hgrepo &&
746
+ (
747
+ cd hgrepo &&
748
+ echo a >a &&
749
+ hg add a &&
750
+ hg commit -m a &&
751
+ hg bookmark -r null bmark
752
+ ) &&
753
+
754
+ git clone "hg::hgrepo" gitrepo &&
755
+ check gitrepo HEAD a &&
756
+ (
757
+ cd gitrepo &&
758
+ git checkout --quiet -b bmark &&
759
+ git remote -v &&
760
+ echo b >b &&
761
+ git add b &&
762
+ git commit -m b &&
763
+ git push origin bmark
764
+ )
765
+'
766
+
767
test_done