Mercurial > hg
changeset 2745:1bac2bfe081a
Change patch header as well as commit message with qrefresh -m or -l.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 31 Jul 2006 18:47:43 -0700 |
parents | b5779a04f208 |
children | 0503eb5c0a33 |
files | hgext/mq.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Tue Aug 01 02:23:05 2006 -0700 +++ b/hgext/mq.py Mon Jul 31 18:47:43 2006 -0700 @@ -811,6 +811,16 @@ message, comments, user, date, patchfound = self.readheaders(patch) patchf = self.opener(patch, "w") + msg = msg.rstrip() + if msg: + if comments: + # Remove existing message. + ci = 0 + for mi in range(len(message)): + while message[mi] != comments[ci]: + ci += 1 + del comments[ci] + comments.append(msg) if comments: comments = "\n".join(comments) + '\n\n' patchf.write(comments)