# HG changeset patch # User Vadim Gelfer # Date 1135782832 28800 # Node ID da3f1121721b53cddc730b12dd0c50769e04cb56 # Parent 5352a5407dc1d680dc8cee4d3e7672332a1338dd add --plain option to patchbomb. this omits the hg patch headers. it makes a patchbomb email look like a regular email with a patch. diff -r 5352a5407dc1 -r da3f1121721b contrib/patchbomb --- a/contrib/patchbomb Wed Dec 28 07:11:46 2005 -0800 +++ b/contrib/patchbomb Wed Dec 28 07:13:52 2005 -0800 @@ -128,6 +128,10 @@ # 'Patch subject is complete summary.') #body += '\n\n\n' + if opts['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']: body += cdiffstat('\n'.join(desc), patch) + '\n\n' body += '\n'.join(patch) @@ -252,6 +256,7 @@ optspec = [('c', 'cc', [], 'email addresses of copy recipients'), ('d', 'diffstat', None, 'add diffstat output to messages'), ('f', 'from', '', 'email address of sender'), + ('', 'plain', None, 'omit hg patch header'), ('n', 'test', None, 'print messages that would be sent'), ('s', 'subject', '', 'subject of introductory message'), ('t', 'to', [], 'email addresses of recipients')]