hgext/mq.py
changeset 22519 c87f2a5a6e49
parent 22457 48791c2bea1c
child 22520 9d4ebb75de53
--- a/hgext/mq.py	Tue Sep 16 14:51:56 2014 -0700
+++ b/hgext/mq.py	Sat Sep 20 17:06:56 2014 +0200
@@ -1073,10 +1073,8 @@
                 if self.plainmode:
                     if user:
                         p.write("From: " + user + "\n")
-                        if not date:
-                            p.write("\n")
                     if date:
-                        p.write("Date: %d %d\n\n" % date)
+                        p.write("Date: %d %d\n" % date)
                 else:
                     p.write("# HG changeset patch\n")
                     p.write("# Parent "
@@ -1084,7 +1082,7 @@
                     if user:
                         p.write("# User " + user + "\n")
                     if date:
-                        p.write("# Date %s %s\n\n" % date)
+                        p.write("# Date %s %s\n" % date)
 
                 defaultmsg = "[mq]: %s" % patchfn
                 editor = cmdutil.getcommiteditor(editform=editform)
@@ -1117,6 +1115,8 @@
                     if nctx.description() != defaultmsg.rstrip():
                         msg = nctx.description() + "\n\n"
                         p.write(msg)
+                    elif not self.plainmode or date or user:
+                        p.write('\n')
                     if commitfiles:
                         parent = self.qparents(repo, n)
                         if inclsubs: