diff mercurial/localrepo.py @ 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 0145f9afb0e7
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,