[PATCH 1 of 3] Syntax:
Hollis Blanchard
hollisb at us.ibm.com
Thu Nov 1 17:20:46 CDT 2007
Syntax:
[email]
diffstat = True
git = True
plain = True
Signed-off-by: Hollis Blanchard <hollisb at us.ibm.com>
---
1 file changed, 5 insertions(+), 4 deletions(-)
hgext/patchbomb.py | 9 +++++----
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -161,11 +161,11 @@ def patchbomb(ui, repo, *revs, **opts):
# 'Patch subject is complete summary.')
#body += '\n\n\n'
- if opts['plain']:
+ if (opts['plain'] or ui.config('email', 'plain')):
while patch and patch[0].startswith('# '): patch.pop(0)
if patch: patch.pop(0)
while patch and not patch[0].strip(): patch.pop(0)
- if opts['diffstat']:
+ if (opts['diffstat'] or ui.config('email', 'diffstat')):
body += cdiffstat('\n'.join(desc), patch) + '\n\n'
if opts['attach']:
msg = email.MIMEMultipart.MIMEMultipart()
@@ -277,10 +277,11 @@ def patchbomb(ui, repo, *revs, **opts):
self.container.append(''.join(self.lines).split('\n'))
self.lines = []
+ git = (opts['git'] or ui.config('email', 'git'))
commands.export(ui, repo, *revs, **{'output': exportee(patches),
'switch_parent': False,
'text': None,
- 'git': opts.get('git')})
+ 'git': git})
jumbo = []
msgs = []
@@ -302,7 +303,7 @@ def patchbomb(ui, repo, *revs, **opts):
len(patches))))
body = ''
- if opts['diffstat']:
+ if (opts['diffstat'] or ui.config('email', 'diffstat')):
d = cdiffstat(_('Final summary:\n'), jumbo)
if d: body = '\n' + d
More information about the Mercurial-devel
mailing list