Mercurial > hg
changeset 5757:c5793dada959
Clarify some messages during commit:
- use "branch 'foo'" to distinguish from "branch merge".
- commit messags can be empty (to abort commits)
- Added value for editor message: Tell about HG: lines like CVS does.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Dec 2007 17:10:25 +0100 |
parents | 6183df642f95 |
children | 3aa0af7d539d |
files | mercurial/localrepo.py tests/test-commit.out tests/test-import.out tests/test-record.out |
diffstat | 4 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Dec 28 16:32:14 2007 +0100 +++ b/mercurial/localrepo.py Fri Dec 28 17:10:25 2007 +0100 @@ -799,13 +799,14 @@ if text: edittext.append(text) edittext.append("") - edittext.append(_("HG: Please write and save a commit message")) + edittext.append(_("HG: Enter commit message." + " Lines beginning with 'HG:' are removed.")) edittext.append("HG: --") edittext.append("HG: user: %s" % user) if p2 != nullid: edittext.append("HG: branch merge") if branchname: - edittext.append("HG: branch %s" % util.tolocal(branchname)) + edittext.append("HG: branch '%s'" % util.tolocal(branchname)) edittext.extend(["HG: changed %s" % f for f in changed]) edittext.extend(["HG: removed %s" % f for f in removed]) if not changed and not remove: @@ -825,7 +826,7 @@ while lines and not lines[0]: del lines[0] if not lines: - raise util.Abort(_("commit message cannot be left blank")) + raise util.Abort(_("empty commit message")) text = '\n'.join(lines) n = self.changelog.add(mn, changed + removed, text, trp, p1, p2,
--- a/tests/test-commit.out Fri Dec 28 16:32:14 2007 +0100 +++ b/tests/test-commit.out Fri Dec 28 17:10:25 2007 +0100 @@ -1,7 +1,7 @@ % commit date test transaction abort! rollback completed -abort: commit message cannot be left blank +abort: empty commit message transaction abort! rollback completed abort: impossible time zone offset: 4444444
--- a/tests/test-import.out Fri Dec 28 16:32:14 2007 +0100 +++ b/tests/test-import.out Fri Dec 28 17:10:25 2007 +0100 @@ -22,7 +22,7 @@ applying ../tip.patch transaction abort! rollback completed -abort: commit message cannot be left blank +abort: empty commit message % import of plain diff should be ok with message requesting all changes adding changesets @@ -92,7 +92,7 @@ applying patch from stdin transaction abort! rollback completed -abort: commit message cannot be left blank +abort: empty commit message % hg export in email, should use patch header requesting all changes adding changesets
--- a/tests/test-record.out Fri Dec 28 16:32:14 2007 +0100 +++ b/tests/test-record.out Fri Dec 28 17:10:25 2007 +0100 @@ -50,7 +50,7 @@ new file mode 100644 examine changes to 'empty-rw'? [Ynsfdaq?] transaction abort! rollback completed -abort: commit message cannot be left blank +abort: empty commit message changeset: -1:000000000000 tag: tip