diff mercurial/localrepo.py @ 5754:75c2071385da

Prompt for a commit message in editor, improve error message
author Patrick Mezard <pmezard@gmail.com>
date Fri, 28 Dec 2007 14:51:16 +0100
parents 883d887c6408
children 6183df642f95
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Dec 27 22:28:41 2007 +0100
+++ b/mercurial/localrepo.py	Fri Dec 28 14:51:16 2007 +0100
@@ -803,6 +803,8 @@
                 if text:
                     edittext.append(text)
                 edittext.append("")
+                edittext.append(_("HG: Please write and save a commit message"))
+                edittext.append("HG: --")
                 edittext.append("HG: user: %s" % user)
                 if p2 != nullid:
                     edittext.append("HG: branch merge")
@@ -827,7 +829,7 @@
                 while lines and not lines[0]:
                     del lines[0]
                 if not lines:
-                    return None
+                    raise util.Abort(_("commit message cannot be left blank"))
                 text = '\n'.join(lines)
 
             n = self.changelog.add(mn, changed + removed, text, trp, p1, p2,