[PATCH] A new version of the base64 patch that does not spill a -j option on
peter.kourzanov at xs4all.nl
peter.kourzanov at xs4all.nl
Wed May 21 17:13:16 CDT 2008
# HG changeset patch
# User pjotr kourzanov <peter.kourzanov at xs4all.nl>
# Date 1211407944 -7200
# Node ID 26b6a79a82015f502b31ae09b1d71c68a6e7e9ec
# Parent 9002bfa09fe416105ee6e4a0d3915ab7d93ac012
A new version of the base64 patch that does not spill a -j option on
--base64
diff -r 9002bfa09fe4 -r 26b6a79a8201 hgext/patchbomb.py
--- a/hgext/patchbomb.py Thu May 22 00:11:43 2008 +0200
+++ b/hgext/patchbomb.py Thu May 22 00:12:24 2008 +0200
@@ -196,6 +196,11 @@
if opts['attach']:
disposition = 'attachment'
p['Content-Disposition'] = disposition + '; filename=' + patchname
+ if not opts.get('inline') and (\
+ opts.get('base64') or\
+ ui.config('email', 'encoding')=='base64' or\
+ ui.config('patchbomb', 'encoding')=='base64'):
+ email.Encoders.encode_base64(p)
msg.attach(p)
else:
body += '\n'.join(patch)
@@ -441,6 +446,7 @@
(patchbomb,
[('a', 'attach', None, _('send patches as attachments')),
('i', 'inline', None, _('send patches as inline attachments')),
+ ('', 'base64', None, _('encode patches with base64 (requires sending them as attachments)')),
('', 'bcc', [], _('email addresses of blind copy recipients')),
('c', 'cc', [], _('email addresses of copy recipients')),
('d', 'diffstat', None, _('add diffstat output to messages')),
More information about the Mercurial-devel
mailing list