Show More
@@ -860,6 +860,13 b' class localrepository(repo.repository):' | |||||
860 | else: |
|
860 | else: | |
861 | remove.append(f) |
|
861 | remove.append(f) | |
862 |
|
862 | |||
|
863 | updated, added = [], [] | |||
|
864 | for f in util.sort(changed): | |||
|
865 | if f in m1 or f in m2: | |||
|
866 | updated.append(f) | |||
|
867 | else: | |||
|
868 | added.append(f) | |||
|
869 | ||||
863 | # update manifest |
|
870 | # update manifest | |
864 | m1.update(new) |
|
871 | m1.update(new) | |
865 | removed = [] |
|
872 | removed = [] | |
@@ -888,9 +895,10 b' class localrepository(repo.repository):' | |||||
888 | edittext.append("HG: branch merge") |
|
895 | edittext.append("HG: branch merge") | |
889 | if branchname: |
|
896 | if branchname: | |
890 | edittext.append("HG: branch '%s'" % util.tolocal(branchname)) |
|
897 | edittext.append("HG: branch '%s'" % util.tolocal(branchname)) | |
891 |
edittext.extend(["HG: |
|
898 | edittext.extend(["HG: added %s" % f for f in added]) | |
|
899 | edittext.extend(["HG: changed %s" % f for f in updated]) | |||
892 | edittext.extend(["HG: removed %s" % f for f in removed]) |
|
900 | edittext.extend(["HG: removed %s" % f for f in removed]) | |
893 |
if not |
|
901 | if not added and not updated and not removed: | |
894 | edittext.append("HG: no files changed") |
|
902 | edittext.append("HG: no files changed") | |
895 | edittext.append("") |
|
903 | edittext.append("") | |
896 | # run editor in the repository root |
|
904 | # run editor in the repository root |
@@ -106,5 +106,21 b' echo % should fail because we are specif' | |||||
106 | hg ci -mmerge -I a |
|
106 | hg ci -mmerge -I a | |
107 | echo % should succeed |
|
107 | echo % should succeed | |
108 | hg ci -mmerge |
|
108 | hg ci -mmerge | |
|
109 | cd .. | |||
|
110 | ||||
|
111 | ||||
|
112 | echo % test commit message content | |||
|
113 | hg init commitmsg | |||
|
114 | cd commitmsg | |||
|
115 | echo changed > changed | |||
|
116 | echo removed > removed | |||
|
117 | hg ci -qAm init | |||
|
118 | ||||
|
119 | hg rm removed | |||
|
120 | echo changed >> changed | |||
|
121 | echo added > added | |||
|
122 | hg add added | |||
|
123 | HGEDITOR=cat hg ci -A | |||
|
124 | cd .. | |||
109 |
|
125 | |||
110 | exit 0 |
|
126 | exit 0 |
@@ -106,3 +106,16 b' abort: cannot partially commit a merge (' | |||||
106 | % should fail because we are specifying a pattern |
|
106 | % should fail because we are specifying a pattern | |
107 | abort: cannot partially commit a merge (do not specify files or patterns) |
|
107 | abort: cannot partially commit a merge (do not specify files or patterns) | |
108 | % should succeed |
|
108 | % should succeed | |
|
109 | % test commit message content | |||
|
110 | ||||
|
111 | ||||
|
112 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |||
|
113 | HG: -- | |||
|
114 | HG: user: test | |||
|
115 | HG: branch 'default' | |||
|
116 | HG: added added | |||
|
117 | HG: changed changed | |||
|
118 | HG: removed removed | |||
|
119 | transaction abort! | |||
|
120 | rollback completed | |||
|
121 | abort: empty commit message |
General Comments 0
You need to be logged in to leave comments.
Login now