comparison mercurial/patch.py @ 15159:85322c19c831

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 27 Sep 2011 18:50:18 -0500
parents bfe903b1ff4e 7ce7177e029a
children 2c4fdee4d1a8
comparison
equal deleted inserted replaced
15156:143c78b4fc8c 15159:85322c19c831
186 if subject: 186 if subject:
187 if subject.startswith('[PATCH'): 187 if subject.startswith('[PATCH'):
188 pend = subject.find(']') 188 pend = subject.find(']')
189 if pend >= 0: 189 if pend >= 0:
190 subject = subject[pend + 1:].lstrip() 190 subject = subject[pend + 1:].lstrip()
191 subject = subject.replace('\n\t', ' ') 191 subject = re.sub(r'\n[ \t]+', ' ', subject)
192 ui.debug('Subject: %s\n' % subject) 192 ui.debug('Subject: %s\n' % subject)
193 if user: 193 if user:
194 ui.debug('From: %s\n' % user) 194 ui.debug('From: %s\n' % user)
195 diffs_seen = 0 195 diffs_seen = 0
196 ok_types = ('text/plain', 'text/x-diff', 'text/x-patch') 196 ok_types = ('text/plain', 'text/x-diff', 'text/x-patch')