[PATCH 1 of 1] patchbomb: do not assume the presence of angle brackets around msg-id

Cedric Duval cedricduval at free.fr
Thu Jun 18 04:02:52 CDT 2009


Martin Geisler wrote:
> > 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.

> Let me try to understand: is the problem that the user will do

>   hg email --in-reply-to foo

> but the mail must have

>   In-Reply-To: <foo>

> ?

Yes, the --in-reply-to option expects the Message-Id of the parent
message, which may be given as
  --in-reply-to "<foo>"
as well as
  --in-reply-to foo

(and even better if it is foolproof against a single missing bracket,
from a sloppy cut'n'paste, as I usually do from mutt)

The presence of the angle brackets is mandated in the Message-Id,
In-Reply-To and References headers of the mail, but as quoted from
above they are not a semantic part of the Id.

So it is better to be liberal in what we accept here, rather than risk
a bad assumption (as I did in a previous use of patchbomb), or having
to think twice (in other words check the code) about the right format.
-- 
Cédric


More information about the Mercurial-devel mailing list