690 abort: commit message unchanged |
690 abort: commit message unchanged |
691 [255] |
691 [255] |
692 |
692 |
693 test that text below the --- >8 --- special string is ignored |
693 test that text below the --- >8 --- special string is ignored |
694 |
694 |
|
695 $ cat <<'EOF' > $TESTTMP/lowercaseline.sh |
|
696 > cat $1 | sed s/LINE/line/ | tee $1.new |
|
697 > mv $1.new $1 |
|
698 > EOF |
|
699 |
695 $ hg init ignore_below_special_string |
700 $ hg init ignore_below_special_string |
696 $ cd ignore_below_special_string |
701 $ cd ignore_below_special_string |
697 $ echo foo > foo |
702 $ echo foo > foo |
698 $ hg add foo |
703 $ hg add foo |
699 $ hg commit -m "foo" |
704 $ hg commit -m "foo" |
700 $ cat >> .hg/hgrc <<EOF |
705 $ cat >> .hg/hgrc <<EOF |
701 > [committemplate] |
706 > [committemplate] |
702 > changeset.commit = first line |
707 > changeset.commit = first LINE |
703 > HG: this is customized commit template |
708 > HG: this is customized commit template |
704 > HG: {extramsg} |
709 > HG: {extramsg} |
705 > HG: ------------------------ >8 ------------------------ |
710 > HG: ------------------------ >8 ------------------------ |
706 > {diff()} |
711 > {diff()} |
707 > EOF |
712 > EOF |
708 $ echo foo2 > foo2 |
713 $ echo foo2 > foo2 |
709 $ hg add foo2 |
714 $ hg add foo2 |
710 $ HGEDITOR=cat hg ci |
715 $ HGEDITOR="sh $TESTTMP/lowercaseline.sh" hg ci |
711 first line |
716 first line |
712 HG: this is customized commit template |
717 HG: this is customized commit template |
713 HG: Leave message empty to abort commit. |
718 HG: Leave message empty to abort commit. |
714 HG: ------------------------ >8 ------------------------ |
719 HG: ------------------------ >8 ------------------------ |
715 diff -r e63c23eaa88a foo2 |
720 diff -r e63c23eaa88a foo2 |
723 test that the special string --- >8 --- isn't used when not at the beginning of |
728 test that the special string --- >8 --- isn't used when not at the beginning of |
724 a line |
729 a line |
725 |
730 |
726 $ cat >> .hg/hgrc <<EOF |
731 $ cat >> .hg/hgrc <<EOF |
727 > [committemplate] |
732 > [committemplate] |
728 > changeset.commit = first line2 |
733 > changeset.commit = first LINE2 |
729 > another line HG: ------------------------ >8 ------------------------ |
734 > another line HG: ------------------------ >8 ------------------------ |
730 > HG: this is customized commit template |
735 > HG: this is customized commit template |
731 > HG: {extramsg} |
736 > HG: {extramsg} |
732 > HG: ------------------------ >8 ------------------------ |
737 > HG: ------------------------ >8 ------------------------ |
733 > {diff()} |
738 > {diff()} |
734 > EOF |
739 > EOF |
735 $ echo foo >> foo |
740 $ echo foo >> foo |
736 $ HGEDITOR=cat hg ci |
741 $ HGEDITOR="sh $TESTTMP/lowercaseline.sh" hg ci |
737 first line2 |
742 first line2 |
738 another line HG: ------------------------ >8 ------------------------ |
743 another line HG: ------------------------ >8 ------------------------ |
739 HG: this is customized commit template |
744 HG: this is customized commit template |
740 HG: Leave message empty to abort commit. |
745 HG: Leave message empty to abort commit. |
741 HG: ------------------------ >8 ------------------------ |
746 HG: ------------------------ >8 ------------------------ |
752 also test that this special string isn't accepted when there is some extra text |
757 also test that this special string isn't accepted when there is some extra text |
753 at the end |
758 at the end |
754 |
759 |
755 $ cat >> .hg/hgrc <<EOF |
760 $ cat >> .hg/hgrc <<EOF |
756 > [committemplate] |
761 > [committemplate] |
757 > changeset.commit = first line3 |
762 > changeset.commit = first LINE3 |
758 > HG: ------------------------ >8 ------------------------foobar |
763 > HG: ------------------------ >8 ------------------------foobar |
759 > second line |
764 > second line |
760 > HG: this is customized commit template |
765 > HG: this is customized commit template |
761 > HG: {extramsg} |
766 > HG: {extramsg} |
762 > HG: ------------------------ >8 ------------------------ |
767 > HG: ------------------------ >8 ------------------------ |
763 > {diff()} |
768 > {diff()} |
764 > EOF |
769 > EOF |
765 $ echo foo >> foo |
770 $ echo foo >> foo |
766 $ HGEDITOR=cat hg ci |
771 $ HGEDITOR="sh $TESTTMP/lowercaseline.sh" hg ci |
767 first line3 |
772 first line3 |
768 HG: ------------------------ >8 ------------------------foobar |
773 HG: ------------------------ >8 ------------------------foobar |
769 second line |
774 second line |
770 HG: this is customized commit template |
775 HG: this is customized commit template |
771 HG: Leave message empty to abort commit. |
776 HG: Leave message empty to abort commit. |