comparison hgext/patchbomb.py @ 3051:51b7f792e473

Detect git patches in patchbomb makepatch function
author Brendan Cully <brendan@kublai.com>
date Wed, 30 Aug 2006 12:55:10 -0700
parents 5a17423f88d7
children f422c8265ae5
comparison
equal deleted inserted replaced
3028:eba7c78c80fe 3051:51b7f792e473
138 body = '' 138 body = ''
139 for line in patch: 139 for line in patch:
140 if line.startswith('#'): 140 if line.startswith('#'):
141 if line.startswith('# Node ID'): node = line.split()[-1] 141 if line.startswith('# Node ID'): node = line.split()[-1]
142 continue 142 continue
143 if line.startswith('diff -r'): break 143 if (line.startswith('diff -r')
144 or line.startswith('diff --git')):
145 break
144 desc.append(line) 146 desc.append(line)
145 if not node: raise ValueError 147 if not node: raise ValueError
146 148
147 #body = ('\n'.join(desc[1:]).strip() or 149 #body = ('\n'.join(desc[1:]).strip() or
148 # 'Patch subject is complete summary.') 150 # 'Patch subject is complete summary.')