Mercurial > hg
comparison hgext/mq.py @ 23346:5ccced6eab0b stable
mq: when adding headers in plain mode, separate them from message (issue4453)
c87f2a5a6e49 did a clean-up in one direction ... but we want it in the other
direction.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 17 Nov 2014 01:48:43 +0100 |
parents | 83cbf556babf |
children | 94092019e839 |
comparison
equal
deleted
inserted
replaced
23345:83cbf556babf | 23346:5ccced6eab0b |
---|---|
149 return lines | 149 return lines |
150 lines.append(header + value) | 150 lines.append(header + value) |
151 return lines | 151 return lines |
152 | 152 |
153 def insertplainheader(lines, header, value): | 153 def insertplainheader(lines, header, value): |
154 if lines and lines[0] and ':' not in lines[0]: | |
155 lines.insert(0, '') | |
154 lines.insert(0, '%s: %s' % (header, value)) | 156 lines.insert(0, '%s: %s' % (header, value)) |
155 return lines | 157 return lines |
156 | 158 |
157 class patchheader(object): | 159 class patchheader(object): |
158 def __init__(self, pf, plainmode=False): | 160 def __init__(self, pf, plainmode=False): |