##// END OF EJS Templates
Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard -
r7072:4e0d54fb default
parent child Browse files
Show More
@@ -860,6 +860,13 b' class localrepository(repo.repository):'
860 860 else:
861 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 870 # update manifest
864 871 m1.update(new)
865 872 removed = []
@@ -888,9 +895,10 b' class localrepository(repo.repository):'
888 895 edittext.append("HG: branch merge")
889 896 if branchname:
890 897 edittext.append("HG: branch '%s'" % util.tolocal(branchname))
891 edittext.extend(["HG: changed %s" % f for f in changed])
898 edittext.extend(["HG: added %s" % f for f in added])
899 edittext.extend(["HG: changed %s" % f for f in updated])
892 900 edittext.extend(["HG: removed %s" % f for f in removed])
893 if not changed and not remove:
901 if not added and not updated and not removed:
894 902 edittext.append("HG: no files changed")
895 903 edittext.append("")
896 904 # run editor in the repository root
@@ -106,5 +106,21 b' echo % should fail because we are specif'
106 106 hg ci -mmerge -I a
107 107 echo % should succeed
108 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 126 exit 0
@@ -106,3 +106,16 b' abort: cannot partially commit a merge ('
106 106 % should fail because we are specifying a pattern
107 107 abort: cannot partially commit a merge (do not specify files or patterns)
108 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