equal
deleted
inserted
replaced
955 ----------------------------------------------------------------- |
955 ----------------------------------------------------------------- |
956 |
956 |
957 $ cat >> .hg/hgrc <<EOF |
957 $ cat >> .hg/hgrc <<EOF |
958 > [committemplate] |
958 > [committemplate] |
959 > changeset.commit.amend = {desc}\n |
959 > changeset.commit.amend = {desc}\n |
|
960 > HG: {revset('parents()') % 'parent: {desc|firstline}\n'} |
960 > HG: M: {file_mods} |
961 > HG: M: {file_mods} |
961 > HG: A: {file_adds} |
962 > HG: A: {file_adds} |
962 > HG: R: {file_dels} |
963 > HG: R: {file_dels} |
963 > {splitlines(diff()) % 'HG: {line}\n'} |
964 > {splitlines(diff()) % 'HG: {line}\n'} |
964 > EOF |
965 > EOF |
968 A: foo |
969 A: foo |
969 R: |
970 R: |
970 $ hg status -amr |
971 $ hg status -amr |
971 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" |
972 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" |
972 expecting diff of foo |
973 expecting diff of foo |
|
974 |
|
975 HG: parent: editor should be suppressed |
973 |
976 |
974 HG: M: |
977 HG: M: |
975 HG: A: foo |
978 HG: A: foo |
976 HG: R: |
979 HG: R: |
977 HG: diff -r 0eeafd043f63 foo |
980 HG: diff -r 0eeafd043f63 foo |
982 |
985 |
983 $ echo y > y |
986 $ echo y > y |
984 $ hg add y |
987 $ hg add y |
985 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" |
988 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" |
986 expecting diff of foo and y |
989 expecting diff of foo and y |
|
990 |
|
991 HG: parent: expecting diff of foo |
987 |
992 |
988 HG: M: |
993 HG: M: |
989 HG: A: foo y |
994 HG: A: foo y |
990 HG: R: |
995 HG: R: |
991 HG: diff -r 0eeafd043f63 foo |
996 HG: diff -r 0eeafd043f63 foo |
1000 HG: +y |
1005 HG: +y |
1001 |
1006 |
1002 $ hg rm a |
1007 $ hg rm a |
1003 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" |
1008 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" |
1004 expecting diff of a, foo and y |
1009 expecting diff of a, foo and y |
|
1010 |
|
1011 HG: parent: expecting diff of foo and y |
1005 |
1012 |
1006 HG: M: |
1013 HG: M: |
1007 HG: A: foo y |
1014 HG: A: foo y |
1008 HG: R: a |
1015 HG: R: a |
1009 HG: diff -r 0eeafd043f63 a |
1016 HG: diff -r 0eeafd043f63 a |
1024 HG: +y |
1031 HG: +y |
1025 |
1032 |
1026 $ hg rm x |
1033 $ hg rm x |
1027 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" |
1034 $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" |
1028 expecting diff of a, foo, x and y |
1035 expecting diff of a, foo, x and y |
|
1036 |
|
1037 HG: parent: expecting diff of a, foo and y |
1029 |
1038 |
1030 HG: M: |
1039 HG: M: |
1031 HG: A: foo y |
1040 HG: A: foo y |
1032 HG: R: a x |
1041 HG: R: a x |
1033 HG: diff -r 0eeafd043f63 a |
1042 HG: diff -r 0eeafd043f63 a |
1056 $ hg status -amr |
1065 $ hg status -amr |
1057 M cc |
1066 M cc |
1058 $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc |
1067 $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc |
1059 cc should be excluded |
1068 cc should be excluded |
1060 |
1069 |
|
1070 HG: parent: expecting diff of a, foo, x and y |
|
1071 |
1061 HG: M: |
1072 HG: M: |
1062 HG: A: foo y |
1073 HG: A: foo y |
1063 HG: R: a x |
1074 HG: R: a x |
1064 HG: diff -r 0eeafd043f63 a |
1075 HG: diff -r 0eeafd043f63 a |
1065 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
1076 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |