Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 7072:4e0d54fbd34f
Show added files as "added" in editor commit message (issue 1330)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 09 Oct 2008 14:16:17 +0200 |
parents | 40d105a12cac |
children | ccbd39cad3c3 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Oct 08 19:58:35 2008 -0500 +++ b/mercurial/localrepo.py Thu Oct 09 14:16:17 2008 +0200 @@ -860,6 +860,13 @@ else: remove.append(f) + updated, added = [], [] + for f in util.sort(changed): + if f in m1 or f in m2: + updated.append(f) + else: + added.append(f) + # update manifest m1.update(new) removed = [] @@ -888,9 +895,10 @@ edittext.append("HG: branch merge") if branchname: edittext.append("HG: branch '%s'" % util.tolocal(branchname)) - edittext.extend(["HG: changed %s" % f for f in changed]) + edittext.extend(["HG: added %s" % f for f in added]) + edittext.extend(["HG: changed %s" % f for f in updated]) edittext.extend(["HG: removed %s" % f for f in removed]) - if not changed and not remove: + if not added and not updated and not removed: edittext.append("HG: no files changed") edittext.append("") # run editor in the repository root