Patchwork [8,of,8] mq: don't add '* * *' separators when there is no commit message

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 17, 2013, 4:29 p.m.
Message ID <d5981e396c24c0089d53.1384705744@localhost.localdomain>
Download mbox | patch
Permalink /patch/3015/
State Accepted
Commit 2455e96ec73b24c6fd9bd665b2ea4083a480d5e9
Headers show

Comments

Mads Kiilerich - Nov. 17, 2013, 4:29 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1384634788 18000
#      Sat Nov 16 15:46:28 2013 -0500
# Branch stable
# Node ID d5981e396c24c0089d5308b688c595c910cfc7d5
# Parent  b3be2f364608c950e663e7db107bebf48f4ab912
mq: don't add '* * *' separators when there is no commit message

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -2565,8 +2565,10 @@  def fold(ui, repo, *files, **opts):
         ph = patchheader(q.join(parent), q.plainmode)
         message, user = ph.message, ph.user
         for msg in messages:
-            message.append('* * *')
-            message.extend(msg)
+            if msg:
+                if message:
+                    message.append('* * *')
+                message.extend(msg)
         message = '\n'.join(message)
 
     if opts.get('edit'):