[PATCH 2 of 2] patchbomb: simplify some line continuations
Christian Ebert
blacktrash at gmx.net
Sun Dec 30 13:45:07 UTC 2007
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1199022183 -3600
# Node ID 6dfaa22f0e0e91dd1bf4960817db41bd80594824
# Parent 4e97d4e8442ad9dc446f2385362dbaa6e0704610
patchbomb: simplify some line continuations
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -156,8 +156,7 @@ def patchbomb(ui, repo, *revs, **opts):
if line.startswith('# Node ID'):
node = line.split()[-1]
continue
- if (line.startswith('diff -r')
- or line.startswith('diff --git')):
+ if line.startswith('diff -r') or line.startswith('diff --git'):
break
desc.append(line)
if not node:
@@ -189,7 +188,7 @@ def patchbomb(ui, repo, *revs, **opts):
patchname = patchname[0]
elif total > 1:
patchname = cmdutil.make_filename(repo, '%b-%n.patch',
- binnode, idx, total)
+ binnode, idx, total)
else:
patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
p['Content-Disposition'] = 'inline; filename=' + patchname
@@ -316,11 +315,10 @@ def patchbomb(ui, repo, *revs, **opts):
tlen = len(str(len(patches)))
subj = '[PATCH %0*d of %d] %s' % (
- tlen, 0,
- len(patches),
+ tlen, 0, len(patches),
opts['subject'] or
- prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0,
- len(patches))))
+ prompt('Subject:',
+ rest=' [PATCH %0*d of %d] ' % (tlen, 0, len(patches))))
body = ''
if opts['diffstat']:
More information about the Mercurial-devel
mailing list