X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/6b1e01119114f9ebf4e047485f089b7c58823710..b3bfa1200ad22ba55ed1531bff439d6d63ec36e5:/stgit/commands/mail.py diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index fff069c..c3c047a 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -90,6 +90,9 @@ options = [make_option('-a', '--all', make_option('--bcc', help = 'add BCC to the Bcc: list', action = 'append'), + make_option('--noreply', + help = 'do not send subsequent messages as replies', + action = 'store_true'), make_option('-v', '--version', metavar = 'VERSION', help = 'add VERSION to the [PATCH ...] prefix'), make_option('-t', '--template', metavar = 'FILE', @@ -387,7 +390,10 @@ def func(parser, options, args): if total_nr == 0: raise CmdException, 'No patches to send' - ref_id = options.refid + if options.noreply: + ref_id = None + else: + ref_id = options.refid if options.sleep != None: sleep = options.sleep @@ -398,7 +404,7 @@ def func(parser, options, args): if options.cover or options.edit: # find the template file if options.cover: - tmpl = file(options.template).read() + tmpl = file(options.cover).read() else: tmpl = templates.get_template('covermail.tmpl') if not tmpl: @@ -409,7 +415,8 @@ def func(parser, options, args): from_addr, to_addr_list = __parse_addresses(msg) # subsequent e-mails are seen as replies to the first one - ref_id = msg_id + if not options.noreply: + ref_id = msg_id if options.mbox: __write_mbox(from_addr, msg) @@ -435,7 +442,7 @@ def func(parser, options, args): from_addr, to_addr_list = __parse_addresses(msg) # subsequent e-mails are seen as replies to the first one - if not ref_id: + if not options.noreply and not ref_id: ref_id = msg_id if options.mbox: