changeset 12900:4ff61287bde2 stable

commit: handle missing newline on last commit comment
author Matt Mackall <mpm@selenic.com>
date Sat, 30 Oct 2010 12:13:52 -0500
parents fabe61418a53
children 593ee3a2a098
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Nov 01 17:26:08 2010 +0100
+++ b/mercurial/cmdutil.py	Sat Oct 30 12:13:52 2010 -0500
@@ -1356,7 +1356,7 @@
     olddir = os.getcwd()
     os.chdir(repo.root)
     text = repo.ui.edit("\n".join(edittext), ctx.user())
-    text = re.sub("(?m)^HG:.*\n", "", text)
+    text = re.sub("(?m)^HG:.*(\n|$)", "", text)
     os.chdir(olddir)
 
     if not text.strip():