changeset 5177:ee6a6592c997

Merge with hg-stable
author Patrick Mezard <pmezard@gmail.com>
date Thu, 16 Aug 2007 08:19:15 +0200
parents 5bbbd1f1d586 (diff) 0edea751bbb2 (current diff)
children fe4d9f7161ac 156f4c8a12aa
files
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -916,8 +916,6 @@ class queue:
             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 @@ class queue:
                         ci += 1
                     del comments[ci]
             comments.append(msg)
+
+        patchf.seek(0)
+        patchf.truncate()
+
         if comments:
             comments = "\n".join(comments) + '\n\n'
             patchf.write(comments)