diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -799,13 +799,14 @@ class localrepository(repo.repository): 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 @@ class localrepository(repo.repository): 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, diff --git a/tests/test-commit.out b/tests/test-commit.out --- a/tests/test-commit.out +++ b/tests/test-commit.out @@ -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 diff --git a/tests/test-import.out b/tests/test-import.out --- a/tests/test-import.out +++ b/tests/test-import.out @@ -22,7 +22,7 @@ 2 files updated, 0 files merged, 0 files 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 @@ 2 files updated, 0 files merged, 0 files 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 diff --git a/tests/test-record.out b/tests/test-record.out --- a/tests/test-record.out +++ b/tests/test-record.out @@ -50,7 +50,7 @@ diff --git a/empty-rw b/empty-rw 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