author | Patrick Mezard <pmezard@gmail.com> |
Thu, 16 Aug 2007 08:19:15 +0200 | |
changeset 5181 | ee6a6592c997 |
parent 5180 | 5bbbd1f1d586 (diff) |
parent 5107 | 0edea751bbb2 (current diff) |
child 5184 | fe4d9f7161ac |
child 5185 | 156f4c8a12aa |
--- a/hgext/mq.py Wed Aug 15 15:30:33 2007 -0500 +++ b/hgext/mq.py Thu Aug 16 08:19:15 2007 +0200 @@ -916,8 +916,6 @@ if line.startswith('diff --git'): self.diffopts().git = True break - patchf.seek(0) - patchf.truncate() msg = opts.get('msg', '').rstrip() if msg: @@ -932,6 +930,10 @@ ci += 1 del comments[ci] comments.append(msg) + + patchf.seek(0) + patchf.truncate() + if comments: comments = "\n".join(comments) + '\n\n' patchf.write(comments)