Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 30724:ee47e951c6f9
commit: fix unmodified message detection for the "--- >8 ----" magic
We need the raw editortext to be compared with the templatetext.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 06 Jan 2017 22:50:04 +0900 |
parents | 32f160ceb99d |
children | 0fbb3a5c188e |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Fri Jan 06 22:44:39 2017 +0900 +++ b/mercurial/cmdutil.py Fri Jan 06 22:50:04 2017 +0900 @@ -2772,14 +2772,15 @@ editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(), editform=editform, pending=pending) + text = editortext # strip away anything below this special string (used for editors that want # to display the diff) - stripbelow = re.search(_linebelow, editortext, flags=re.MULTILINE) + stripbelow = re.search(_linebelow, text, flags=re.MULTILINE) if stripbelow: - editortext = editortext[:stripbelow.start()] - - text = re.sub("(?m)^HG:.*(\n|$)", "", editortext) + text = text[:stripbelow.start()] + + text = re.sub("(?m)^HG:.*(\n|$)", "", text) os.chdir(olddir) if finishdesc: