# HG changeset patch # User Cédric Duval # Date 2009-06-17 18:54:26 # Node ID 2aff285b902f2f970d275255fde758a343ae0074 # Parent ec33cf8610a94def4ab5576c905e583e9fe79749 patchbomb: do not assume the presence of angle brackets around msg-id RFC 5322 states: "Semantically, the angle bracket characters are not part of the msg-id; the msg-id is what is contained between the two angle bracket characters." Hence it should be correct to pass a message Id with no angle brackets to --in-reply-to. Adding them if missing. diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -397,6 +397,13 @@ def patchbomb(ui, repo, *revs, **opts): ui.write('\n') parent = opts.get('in_reply_to') or None + # angle brackets may be omitted, they're not semantically part of the msg-id + if parent is not None: + if not parent.startswith('<'): + parent = '<' + parent + if not parent.endswith('>'): + parent += '>' + first = True sender_addr = email.Utils.parseaddr(sender)[1]