comparison hgext/mq.py @ 23344:6333412245ec stable

mq: when setting message in plain mode, separate it from header (issue4453) Fix inconsistent handling of plain header separation in mq patcheader - and contrary to c87f2a5a6e49, do it in the direction of having an empty line between header and description. Plain patches are like mails and should thus have an empty line between headers and body in compliance with RFC 822 3.1.
author Mads Kiilerich <madski@unity3d.com>
date Sun, 16 Nov 2014 19:57:40 +0100
parents b6f7cf47f5d1
children 83cbf556babf
comparison
equal deleted inserted replaced
23265:3246801ff313 23344:6333412245ec
291 291
292 def setmessage(self, message): 292 def setmessage(self, message):
293 if self.comments: 293 if self.comments:
294 self._delmsg() 294 self._delmsg()
295 self.message = [message] 295 self.message = [message]
296 self.comments += self.message 296 if message:
297 if self.plainmode and self.comments and self.comments[-1]:
298 self.comments.append('')
299 self.comments.append(message)
297 300
298 def updateheader(self, prefixes, new): 301 def updateheader(self, prefixes, new):
299 '''Update all references to a field in the patch header. 302 '''Update all references to a field in the patch header.
300 Return whether the field is present.''' 303 Return whether the field is present.'''
301 res = False 304 res = False