Show More
@@ -930,6 +930,37 b' Test that amend with --edit invokes edit' | |||||
930 | $ hg parents --template "{desc}\n" |
|
930 | $ hg parents --template "{desc}\n" | |
931 | editor should be invoked |
|
931 | editor should be invoked | |
932 |
|
932 | |||
|
933 | Test that amend with --no-edit avoids the editor | |||
|
934 | ------------------------------------------------ | |||
|
935 | ||||
|
936 | $ hg commit --amend -m "before anything happens" | |||
|
937 | $ hg parents --template "{desc}\n" | |||
|
938 | before anything happens | |||
|
939 | $ HGEDITOR=cat hg commit --amend --no-edit -m "editor should be suppressed" | |||
|
940 | $ hg parents --template "{desc}\n" | |||
|
941 | editor should be suppressed | |||
|
942 | ||||
|
943 | (We need a file change here since we won't have a message change) | |||
|
944 | $ cp foo foo.orig | |||
|
945 | $ echo hi >> foo | |||
|
946 | FIXME: This shouldn't start the editor. | |||
|
947 | $ HGEDITOR=cat hg commit --amend --no-edit | |||
|
948 | editor should be suppressed | |||
|
949 | ||||
|
950 | ||||
|
951 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |||
|
952 | HG: Leave message empty to abort commit. | |||
|
953 | HG: -- | |||
|
954 | HG: user: test | |||
|
955 | HG: branch 'silliness' | |||
|
956 | HG: added foo | |||
|
957 | $ hg parents --template "{desc}\n" | |||
|
958 | editor should be suppressed | |||
|
959 | $ hg status -mar | |||
|
960 | (Let's undo adding that "hi" so later tests don't need to be adjusted) | |||
|
961 | $ mv foo.orig foo | |||
|
962 | $ hg commit --amend --no-edit | |||
|
963 | ||||
933 | Test that "diff()" in committemplate works correctly for amending |
|
964 | Test that "diff()" in committemplate works correctly for amending | |
934 | ----------------------------------------------------------------- |
|
965 | ----------------------------------------------------------------- | |
935 |
|
966 |
General Comments 0
You need to be logged in to leave comments.
Login now