Clarify some messages during commit:
authorThomas Arendsen Hein <thomas@intevation.de>
Fri, 28 Dec 2007 17:10:25 +0100
changeset 5757 c5793dada959
parent 5756 6183df642f95
child 5758 3aa0af7d539d
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.
mercurial/localrepo.py
tests/test-commit.out
tests/test-import.out
tests/test-record.out
--- 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