##// END OF EJS Templates
patchbomb: simplify some line continuations
Christian Ebert -
r5786:c69ef6fd default
parent child Browse files
Show More
@@ -156,8 +156,7 b' def patchbomb(ui, repo, *revs, **opts):'
156 if line.startswith('# Node ID'):
156 if line.startswith('# Node ID'):
157 node = line.split()[-1]
157 node = line.split()[-1]
158 continue
158 continue
159 if (line.startswith('diff -r')
159 if line.startswith('diff -r') or line.startswith('diff --git'):
160 or line.startswith('diff --git')):
161 break
160 break
162 desc.append(line)
161 desc.append(line)
163 if not node:
162 if not node:
@@ -189,7 +188,7 b' def patchbomb(ui, repo, *revs, **opts):'
189 patchname = patchname[0]
188 patchname = patchname[0]
190 elif total > 1:
189 elif total > 1:
191 patchname = cmdutil.make_filename(repo, '%b-%n.patch',
190 patchname = cmdutil.make_filename(repo, '%b-%n.patch',
192 binnode, idx, total)
191 binnode, idx, total)
193 else:
192 else:
194 patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
193 patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
195 p['Content-Disposition'] = 'inline; filename=' + patchname
194 p['Content-Disposition'] = 'inline; filename=' + patchname
@@ -316,11 +315,10 b' def patchbomb(ui, repo, *revs, **opts):'
316 tlen = len(str(len(patches)))
315 tlen = len(str(len(patches)))
317
316
318 subj = '[PATCH %0*d of %d] %s' % (
317 subj = '[PATCH %0*d of %d] %s' % (
319 tlen, 0,
318 tlen, 0, len(patches),
320 len(patches),
321 opts['subject'] or
319 opts['subject'] or
322 prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0,
320 prompt('Subject:',
323 len(patches))))
321 rest=' [PATCH %0*d of %d] ' % (tlen, 0, len(patches))))
324
322
325 body = ''
323 body = ''
326 if opts['diffstat']:
324 if opts['diffstat']:
General Comments 0
You need to be logged in to leave comments. Login now