Patchwork [2,of,2,V3] patchbomb: includes a unique series ID in email header

login
register
mail settings
Submitter Pierre-Yves David
Date May 7, 2014, 5:52 p.m.
Message ID <4523e13d2ce15bcb1b95.1399485131@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4656/
State Superseded
Commit 21ee9659672459524039a81684088e82eec71c30
Headers show

Comments

Pierre-Yves David - May 7, 2014, 5:52 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1399355480 25200
#      Mon May 05 22:51:20 2014 -0700
# Node ID 4523e13d2ce15bcb1b95ccf2ca2d0caa9db150ef
# Parent  ac17b5ae7f23ecc7c23742d34941b59e2c1a4e21
patchbomb: includes a unique series ID in email header

Now that we have patch index and series size information, having a unique series
identifier will helps tool to glue all email back together without any
additional logic.
Augie Fackler - May 9, 2014, 2:54 p.m.
On Wed, May 07, 2014 at 10:52:11AM -0700, pierre-yves.david@ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1399355480 25200
> #      Mon May 05 22:51:20 2014 -0700
> # Node ID 4523e13d2ce15bcb1b95ccf2ca2d0caa9db150ef
> # Parent  ac17b5ae7f23ecc7c23742d34941b59e2c1a4e21
> patchbomb: includes a unique series ID in email header
>
> Now that we have patch index and series size information, having a unique series
> identifier will helps tool to glue all email back together without any
> additional logic.

Can I persuade you to do something other than the message-id of the
parent message? Maybe a UUID, or the sha1 of the tip of the series
plus a timestamp?

Somehow using the replied-to message id feels messy here - like if the
same message is replied to more than once it'll comingle the
identifiers.

Also possible I'm misreading this patch somehow....

>
> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -517,10 +517,11 @@ def patchbomb(ui, repo, *revs, **opts):
>          if parent:
>              m['In-Reply-To'] = parent
>              m['References'] = parent
>          if not parent or 'X-Mercurial-Node' not in m:
>              parent = m['Message-Id']
> +        m['X-Mercurial-Series-Id'] = parent
>
>          m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version()
>          m['Date'] = email.Utils.formatdate(start_time[0], localtime=True)
>
>          start_time = (start_time[0] + 1, start_time[1])
> diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
> --- a/tests/test-patchbomb.t
> +++ b/tests/test-patchbomb.t
> @@ -18,10 +18,11 @@
>    Subject: [PATCH] a
>    X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <8580ff50825a50c8f716.60@*> (glob)
> +  X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -74,10 +75,11 @@
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2] test
>    Message-Id: <patchbomb.120@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.120@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:02:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -92,10 +94,11 @@
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.121@*> (glob)
>    In-Reply-To: <patchbomb.120@*> (glob)
>    References: <patchbomb.120@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.120@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:02:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -123,10 +126,11 @@
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.122@*> (glob)
>    In-Reply-To: <patchbomb.120@*> (glob)
>    References: <patchbomb.120@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.120@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:02:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -208,10 +212,11 @@ test bundle and description:
>    displaying test ...
>    Content-Type: multipart/mixed; boundary="===*" (glob)
>    MIME-Version: 1.0
>    Subject: test
>    Message-Id: <patchbomb.180@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.180@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:03:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -258,10 +263,11 @@ no mime encoding for email --test:
>    Subject: [PATCH] utf-8 content
>    X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <909a00e13e9d78b575ae.240@*> (glob)
> +  X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:04:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -303,10 +309,11 @@ mime encoded mbox (base64):
>    Subject: [PATCH] utf-8 content
>    X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <909a00e13e9d78b575ae.240@*> (glob)
> +  X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:04:00 +0000
>    From: Q <quux>
>    To: foo
>    Cc: bar
> @@ -364,10 +371,11 @@ no mime encoding for email --test:
>    Subject: [PATCH] long line
>    X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
> +  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:04:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -417,10 +425,11 @@ mime encoded mbox (quoted-printable):
>    Subject: [PATCH] long line
>    X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
> +  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:04:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -478,10 +487,11 @@ fake ascii mbox:
>    Subject: [PATCH] isolatin 8-bit encoding
>    X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <240fb913fc1b7ff15ddb.300@*> (glob)
> +  X-Mercurial-Series-Id: <240fb913fc1b7ff15ddb.300@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:05:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -525,10 +535,11 @@ test diffstat for single patch:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -583,10 +594,11 @@ test diffstat for multiple patches:
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -605,10 +617,11 @@ test diffstat for multiple patches:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -640,10 +653,11 @@ test diffstat for multiple patches:
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -678,10 +692,11 @@ test inline for single patch:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -720,10 +735,11 @@ test inline for single patch (quoted-pri
>    Subject: [PATCH] test
>    X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
> +  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -779,10 +795,11 @@ test inline for multiple patches:
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 3] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -796,10 +813,11 @@ test inline for multiple patches:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 3
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -833,10 +851,11 @@ test inline for multiple patches:
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 3
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -870,10 +889,11 @@ test inline for multiple patches:
>    X-Mercurial-Series-Index: 3
>    X-Mercurial-Series-Total: 3
>    Message-Id: <a2ea8fc83dd8b93cfd86.63@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:03 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -927,10 +947,11 @@ test attach for single patch:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -977,10 +998,11 @@ test attach for single patch (quoted-pri
>    Subject: [PATCH] test
>    X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
> +  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1043,10 +1065,11 @@ test attach and body for single patch:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1105,10 +1128,11 @@ test attach for multiple patches:
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 3] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1122,10 +1146,11 @@ test attach for multiple patches:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 3
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1168,10 +1193,11 @@ test attach for multiple patches:
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 3
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1214,10 +1240,11 @@ test attach for multiple patches:
>    X-Mercurial-Series-Index: 3
>    X-Mercurial-Series-Total: 3
>    Message-Id: <a2ea8fc83dd8b93cfd86.63@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:03 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1282,10 +1309,11 @@ test intro for single patch:
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 1] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1300,10 +1328,11 @@ test intro for single patch:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1334,10 +1363,11 @@ test --desc without --intro for a single
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 1] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1353,10 +1383,11 @@ test --desc without --intro for a single
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1389,10 +1420,11 @@ test intro for multiple patches:
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1407,10 +1439,11 @@ test intro for multiple patches:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1438,10 +1471,11 @@ test intro for multiple patches:
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1474,10 +1508,11 @@ test reply-to via config:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1511,10 +1546,11 @@ test reply-to via command line:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1551,10 +1587,11 @@ test inline for single named patch:
>    Subject: [PATCH] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1593,10 +1630,11 @@ test inline for multiple named/unnamed p
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1610,10 +1648,11 @@ test inline for multiple named/unnamed p
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1647,10 +1686,11 @@ test inline for multiple named/unnamed p
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1693,10 +1733,11 @@ test inreplyto:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <7aead2484924c445ad8c.60@*> (glob)
>    In-Reply-To: <baz>
>    References: <baz>
> +  X-Mercurial-Series-Id: <baz>
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1735,10 +1776,11 @@ no intro message in non-interactive mode
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.60@*> (glob)
>    In-Reply-To: <baz>
>    References: <baz>
> +  X-Mercurial-Series-Id: <baz>
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1766,10 +1808,11 @@ no intro message in non-interactive mode
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.61@*> (glob)
>    In-Reply-To: <baz>
>    References: <baz>
> +  X-Mercurial-Series-Id: <baz>
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1805,10 +1848,11 @@ no intro message in non-interactive mode
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2] test
>    Message-Id: <patchbomb.60@*> (glob)
>    In-Reply-To: <baz>
>    References: <baz>
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1823,10 +1867,11 @@ no intro message in non-interactive mode
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1854,10 +1899,11 @@ no intro message in non-interactive mode
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1892,10 +1938,11 @@ test single flag for single patch (and n
>    Subject: [PATCH fooFlag] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1929,10 +1976,11 @@ test single flag for multiple patches (a
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2 fooFlag] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1947,10 +1995,11 @@ test single flag for multiple patches (a
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -1978,10 +2027,11 @@ test single flag for multiple patches (a
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -2016,10 +2066,11 @@ test multiple flags for single patch:
>    Subject: [PATCH fooFlag barFlag] test
>    X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
> +  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -2052,10 +2103,11 @@ test multiple flags for multiple patches
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 2 fooFlag barFlag] test
>    Message-Id: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:00 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -2070,10 +2122,11 @@ test multiple flags for multiple patches
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 2
>    Message-Id: <8580ff50825a50c8f716.61@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:01 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -2101,10 +2154,11 @@ test multiple flags for multiple patches
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 2
>    Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
>    In-Reply-To: <patchbomb.60@*> (glob)
>    References: <patchbomb.60@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Thu, 01 Jan 1970 00:01:02 +0000
>    From: quux
>    To: foo
>    Cc: bar
> @@ -2140,10 +2194,11 @@ test multi-address parsing:
>    Subject: [PATCH] test
>    X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <8580ff50825a50c8f716.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:00 +0000
>    From: quux
>    To: spam <spam>, eggs, toast
>    Cc: foo, bar@example.com, "A, B <>" <a@example.com>
> @@ -2184,10 +2239,11 @@ test multi-byte domain parsing:
>    Subject: [PATCH] test
>    X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <8580ff50825a50c8f716.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:00 +0000
>    From: quux
>    To: bar@xn--nicode-2ya.com
>
> @@ -2258,10 +2314,11 @@ test outgoing:
>    Content-Type: text/plain; charset="us-ascii"
>    MIME-Version: 1.0
>    Content-Transfer-Encoding: 7bit
>    Subject: [PATCH 0 of 6] test
>    Message-Id: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:00 +0000
>    From: test
>    To: foo
>
> @@ -2275,10 +2332,11 @@ test outgoing:
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 6
>    Message-Id: <ff2c9fa2018b15fa74b3.315532861@*> (glob)
>    In-Reply-To: <patchbomb.315532860@*> (glob)
>    References: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:01 +0000
>    From: test
>    To: foo
>
> @@ -2305,10 +2363,11 @@ test outgoing:
>    X-Mercurial-Series-Index: 2
>    X-Mercurial-Series-Total: 6
>    Message-Id: <909a00e13e9d78b575ae.315532862@*> (glob)
>    In-Reply-To: <patchbomb.315532860@*> (glob)
>    References: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:02 +0000
>    From: test
>    To: foo
>
> @@ -2342,10 +2401,11 @@ test outgoing:
>    X-Mercurial-Series-Index: 3
>    X-Mercurial-Series-Total: 6
>    Message-Id: <a2ea8fc83dd8b93cfd86.315532863@*> (glob)
>    In-Reply-To: <patchbomb.315532860@*> (glob)
>    References: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:03 +0000
>    From: test
>    To: foo
>
> @@ -2388,10 +2448,11 @@ test outgoing:
>    X-Mercurial-Series-Index: 4
>    X-Mercurial-Series-Total: 6
>    Message-Id: <240fb913fc1b7ff15ddb.315532864@*> (glob)
>    In-Reply-To: <patchbomb.315532860@*> (glob)
>    References: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:04 +0000
>    From: test
>    To: foo
>
> @@ -2418,10 +2479,11 @@ test outgoing:
>    X-Mercurial-Series-Index: 5
>    X-Mercurial-Series-Total: 6
>    Message-Id: <5d5ef15dfe5e7bd3a4ee.315532865@*> (glob)
>    In-Reply-To: <patchbomb.315532860@*> (glob)
>    References: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:05 +0000
>    From: test
>    To: foo
>
> @@ -2449,10 +2511,11 @@ test outgoing:
>    X-Mercurial-Series-Index: 6
>    X-Mercurial-Series-Total: 6
>    Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@*> (glob)
>    In-Reply-To: <patchbomb.315532860@*> (glob)
>    References: <patchbomb.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:06 +0000
>    From: test
>    To: foo
>
> @@ -2487,10 +2550,11 @@ dest#branch URIs:
>    Subject: [PATCH] test
>    X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
>    X-Mercurial-Series-Index: 1
>    X-Mercurial-Series-Total: 1
>    Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@*> (glob)
> +  X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@*> (glob)
>    User-Agent: Mercurial-patchbomb/* (glob)
>    Date: Tue, 01 Jan 1980 00:01:00 +0000
>    From: test
>    To: foo
>
Pierre-Yves David - May 10, 2014, 7:58 p.m.
On 05/09/2014 07:54 AM, Augie Fackler wrote:
> On Wed, May 07, 2014 at 10:52:11AM -0700, pierre-yves.david@ens-lyon.org wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david@fb.com>
>> # Date 1399355480 25200
>> #      Mon May 05 22:51:20 2014 -0700
>> # Node ID 4523e13d2ce15bcb1b95ccf2ca2d0caa9db150ef
>> # Parent  ac17b5ae7f23ecc7c23742d34941b59e2c1a4e21
>> patchbomb: includes a unique series ID in email header
>>
>> Now that we have patch index and series size information, having a unique series
>> identifier will helps tool to glue all email back together without any
>> additional logic.
>
> Can I persuade you to do something other than the message-id of the
> parent message? Maybe a UUID, or the sha1 of the tip of the series
> plus a timestamp?

Ho yes, the current id have been quickly picked to make the topic moving 
forward.

> Somehow using the replied-to message id feels messy here - like if the
> same message is replied to more than once it'll comingle the
> identifiers.

No it will not. The ID is put in special header by patchbomb, so human 
reply to this email will not includes the header. And the value of this 
header is always the first patch in the series so a resend of a second 
patchbomb will use a new series ID even if their reply to the initial thread

The question is: is this identifier a good enough one?

I'm not super fan of it and we could use a bit more deterministic 
content. My currently best option would be to use a hash of: all 
revision hash + --flag content.

However I'm not sure the "better" ID is worth the extra complexity.
Augie Fackler - June 6, 2014, 12:51 a.m.
On May 10, 2014, at 3:58 PM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:

> 
> 
> On 05/09/2014 07:54 AM, Augie Fackler wrote:
>> On Wed, May 07, 2014 at 10:52:11AM -0700, pierre-yves.david@ens-lyon.org wrote:
>>> # HG changeset patch
>>> # User Pierre-Yves David <pierre-yves.david@fb.com>
>>> # Date 1399355480 25200
>>> #      Mon May 05 22:51:20 2014 -0700
>>> # Node ID 4523e13d2ce15bcb1b95ccf2ca2d0caa9db150ef
>>> # Parent  ac17b5ae7f23ecc7c23742d34941b59e2c1a4e21
>>> patchbomb: includes a unique series ID in email header
>>> 
>>> Now that we have patch index and series size information, having a unique series
>>> identifier will helps tool to glue all email back together without any
>>> additional logic.
>> 
>> Can I persuade you to do something other than the message-id of the
>> parent message? Maybe a UUID, or the sha1 of the tip of the series
>> plus a timestamp?
> 
> Ho yes, the current id have been quickly picked to make the topic moving forward.
> 
>> Somehow using the replied-to message id feels messy here - like if the
>> same message is replied to more than once it'll comingle the
>> identifiers.
> 
> No it will not. The ID is put in special header by patchbomb, so human reply to this email will not includes the header. And the value of this header is always the first patch in the series so a resend of a second patchbomb will use a new series ID even if their reply to the initial thread

Ah, okay, I misread this. I thought the series ID was the message-id of whatever the replied-to message was, so if people used --in-reply-to that would have confused things. Can you resend and I'll review tomorrow?

(sorry for the lag on this)

> 
> The question is: is this identifier a good enough one?
> 
> I'm not super fan of it and we could use a bit more deterministic content. My currently best option would be to use a hash of: all revision hash + --flag content.
> 
> However I'm not sure the "better" ID is worth the extra complexity.
> 
> -- 
> Pierre-Yves
> 
>
Pierre-Yves David - June 6, 2014, 12:54 a.m.
On 06/05/2014 05:51 PM, Augie Fackler wrote:
>
> On May 10, 2014, at 3:58 PM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:
>
>>
>>
>> On 05/09/2014 07:54 AM, Augie Fackler wrote:
>>> On Wed, May 07, 2014 at 10:52:11AM -0700, pierre-yves.david@ens-lyon.org wrote:
>>>> # HG changeset patch
>>>> # User Pierre-Yves David <pierre-yves.david@fb.com>
>>>> # Date 1399355480 25200
>>>> #      Mon May 05 22:51:20 2014 -0700
>>>> # Node ID 4523e13d2ce15bcb1b95ccf2ca2d0caa9db150ef
>>>> # Parent  ac17b5ae7f23ecc7c23742d34941b59e2c1a4e21
>>>> patchbomb: includes a unique series ID in email header
>>>>
>>>> Now that we have patch index and series size information, having a unique series
>>>> identifier will helps tool to glue all email back together without any
>>>> additional logic.
>>>
>>> Can I persuade you to do something other than the message-id of the
>>> parent message? Maybe a UUID, or the sha1 of the tip of the series
>>> plus a timestamp?
>>
>> Ho yes, the current id have been quickly picked to make the topic moving forward.
>>
>>> Somehow using the replied-to message id feels messy here - like if the
>>> same message is replied to more than once it'll comingle the
>>> identifiers.
>>
>> No it will not. The ID is put in special header by patchbomb, so human reply to this email will not includes the header. And the value of this header is always the first patch in the series so a resend of a second patchbomb will use a new series ID even if their reply to the initial thread
>
> Ah, okay, I misread this. I thought the series ID was the message-id of whatever the replied-to message was, so if people used --in-reply-to that would have confused things. Can you resend and I'll review tomorrow?
>
> (sorry for the lag on this)

I've already resent it a few days ago. (Same patches with a RESEND flag)

You can also get it using:

  hg import --partial --obsolete 
http://review.octopoid.net/patches/4523e13d2ce15bcb1b95ccf2ca2d0caa9db150ef/raw.txt

Patch

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -517,10 +517,11 @@  def patchbomb(ui, repo, *revs, **opts):
         if parent:
             m['In-Reply-To'] = parent
             m['References'] = parent
         if not parent or 'X-Mercurial-Node' not in m:
             parent = m['Message-Id']
+        m['X-Mercurial-Series-Id'] = parent
 
         m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version()
         m['Date'] = email.Utils.formatdate(start_time[0], localtime=True)
 
         start_time = (start_time[0] + 1, start_time[1])
diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
--- a/tests/test-patchbomb.t
+++ b/tests/test-patchbomb.t
@@ -18,10 +18,11 @@ 
   Subject: [PATCH] a
   X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <8580ff50825a50c8f716.60@*> (glob)
+  X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -74,10 +75,11 @@ 
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2] test
   Message-Id: <patchbomb.120@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.120@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:02:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -92,10 +94,11 @@ 
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.121@*> (glob)
   In-Reply-To: <patchbomb.120@*> (glob)
   References: <patchbomb.120@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.120@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:02:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -123,10 +126,11 @@ 
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.122@*> (glob)
   In-Reply-To: <patchbomb.120@*> (glob)
   References: <patchbomb.120@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.120@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:02:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -208,10 +212,11 @@  test bundle and description:
   displaying test ...
   Content-Type: multipart/mixed; boundary="===*" (glob)
   MIME-Version: 1.0
   Subject: test
   Message-Id: <patchbomb.180@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.180@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:03:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -258,10 +263,11 @@  no mime encoding for email --test:
   Subject: [PATCH] utf-8 content
   X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <909a00e13e9d78b575ae.240@*> (glob)
+  X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:04:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -303,10 +309,11 @@  mime encoded mbox (base64):
   Subject: [PATCH] utf-8 content
   X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <909a00e13e9d78b575ae.240@*> (glob)
+  X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:04:00 +0000
   From: Q <quux>
   To: foo
   Cc: bar
@@ -364,10 +371,11 @@  no mime encoding for email --test:
   Subject: [PATCH] long line
   X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
+  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:04:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -417,10 +425,11 @@  mime encoded mbox (quoted-printable):
   Subject: [PATCH] long line
   X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
+  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:04:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -478,10 +487,11 @@  fake ascii mbox:
   Subject: [PATCH] isolatin 8-bit encoding
   X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <240fb913fc1b7ff15ddb.300@*> (glob)
+  X-Mercurial-Series-Id: <240fb913fc1b7ff15ddb.300@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:05:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -525,10 +535,11 @@  test diffstat for single patch:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -583,10 +594,11 @@  test diffstat for multiple patches:
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -605,10 +617,11 @@  test diffstat for multiple patches:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -640,10 +653,11 @@  test diffstat for multiple patches:
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -678,10 +692,11 @@  test inline for single patch:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -720,10 +735,11 @@  test inline for single patch (quoted-pri
   Subject: [PATCH] test
   X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
+  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -779,10 +795,11 @@  test inline for multiple patches:
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 3] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -796,10 +813,11 @@  test inline for multiple patches:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 3
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -833,10 +851,11 @@  test inline for multiple patches:
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 3
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -870,10 +889,11 @@  test inline for multiple patches:
   X-Mercurial-Series-Index: 3
   X-Mercurial-Series-Total: 3
   Message-Id: <a2ea8fc83dd8b93cfd86.63@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:03 +0000
   From: quux
   To: foo
   Cc: bar
@@ -927,10 +947,11 @@  test attach for single patch:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -977,10 +998,11 @@  test attach for single patch (quoted-pri
   Subject: [PATCH] test
   X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
+  X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1043,10 +1065,11 @@  test attach and body for single patch:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1105,10 +1128,11 @@  test attach for multiple patches:
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 3] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1122,10 +1146,11 @@  test attach for multiple patches:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 3
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1168,10 +1193,11 @@  test attach for multiple patches:
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 3
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1214,10 +1240,11 @@  test attach for multiple patches:
   X-Mercurial-Series-Index: 3
   X-Mercurial-Series-Total: 3
   Message-Id: <a2ea8fc83dd8b93cfd86.63@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:03 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1282,10 +1309,11 @@  test intro for single patch:
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 1] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1300,10 +1328,11 @@  test intro for single patch:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1334,10 +1363,11 @@  test --desc without --intro for a single
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 1] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1353,10 +1383,11 @@  test --desc without --intro for a single
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1389,10 +1420,11 @@  test intro for multiple patches:
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1407,10 +1439,11 @@  test intro for multiple patches:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1438,10 +1471,11 @@  test intro for multiple patches:
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1474,10 +1508,11 @@  test reply-to via config:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1511,10 +1546,11 @@  test reply-to via command line:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1551,10 +1587,11 @@  test inline for single named patch:
   Subject: [PATCH] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1593,10 +1630,11 @@  test inline for multiple named/unnamed p
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1610,10 +1648,11 @@  test inline for multiple named/unnamed p
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1647,10 +1686,11 @@  test inline for multiple named/unnamed p
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1693,10 +1733,11 @@  test inreplyto:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <7aead2484924c445ad8c.60@*> (glob)
   In-Reply-To: <baz>
   References: <baz>
+  X-Mercurial-Series-Id: <baz>
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1735,10 +1776,11 @@  no intro message in non-interactive mode
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.60@*> (glob)
   In-Reply-To: <baz>
   References: <baz>
+  X-Mercurial-Series-Id: <baz>
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1766,10 +1808,11 @@  no intro message in non-interactive mode
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.61@*> (glob)
   In-Reply-To: <baz>
   References: <baz>
+  X-Mercurial-Series-Id: <baz>
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1805,10 +1848,11 @@  no intro message in non-interactive mode
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2] test
   Message-Id: <patchbomb.60@*> (glob)
   In-Reply-To: <baz>
   References: <baz>
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1823,10 +1867,11 @@  no intro message in non-interactive mode
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1854,10 +1899,11 @@  no intro message in non-interactive mode
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1892,10 +1938,11 @@  test single flag for single patch (and n
   Subject: [PATCH fooFlag] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1929,10 +1976,11 @@  test single flag for multiple patches (a
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2 fooFlag] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1947,10 +1995,11 @@  test single flag for multiple patches (a
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -1978,10 +2027,11 @@  test single flag for multiple patches (a
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -2016,10 +2066,11 @@  test multiple flags for single patch:
   Subject: [PATCH fooFlag barFlag] test
   X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
+  X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -2052,10 +2103,11 @@  test multiple flags for multiple patches
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 2 fooFlag barFlag] test
   Message-Id: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:00 +0000
   From: quux
   To: foo
   Cc: bar
@@ -2070,10 +2122,11 @@  test multiple flags for multiple patches
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 2
   Message-Id: <8580ff50825a50c8f716.61@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:01 +0000
   From: quux
   To: foo
   Cc: bar
@@ -2101,10 +2154,11 @@  test multiple flags for multiple patches
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 2
   Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
   In-Reply-To: <patchbomb.60@*> (glob)
   References: <patchbomb.60@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.60@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Thu, 01 Jan 1970 00:01:02 +0000
   From: quux
   To: foo
   Cc: bar
@@ -2140,10 +2194,11 @@  test multi-address parsing:
   Subject: [PATCH] test
   X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <8580ff50825a50c8f716.315532860@*> (glob)
+  X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:00 +0000
   From: quux
   To: spam <spam>, eggs, toast
   Cc: foo, bar@example.com, "A, B <>" <a@example.com>
@@ -2184,10 +2239,11 @@  test multi-byte domain parsing:
   Subject: [PATCH] test
   X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <8580ff50825a50c8f716.315532860@*> (glob)
+  X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:00 +0000
   From: quux
   To: bar@xn--nicode-2ya.com
   
@@ -2258,10 +2314,11 @@  test outgoing:
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Subject: [PATCH 0 of 6] test
   Message-Id: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:00 +0000
   From: test
   To: foo
   
@@ -2275,10 +2332,11 @@  test outgoing:
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 6
   Message-Id: <ff2c9fa2018b15fa74b3.315532861@*> (glob)
   In-Reply-To: <patchbomb.315532860@*> (glob)
   References: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:01 +0000
   From: test
   To: foo
   
@@ -2305,10 +2363,11 @@  test outgoing:
   X-Mercurial-Series-Index: 2
   X-Mercurial-Series-Total: 6
   Message-Id: <909a00e13e9d78b575ae.315532862@*> (glob)
   In-Reply-To: <patchbomb.315532860@*> (glob)
   References: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:02 +0000
   From: test
   To: foo
   
@@ -2342,10 +2401,11 @@  test outgoing:
   X-Mercurial-Series-Index: 3
   X-Mercurial-Series-Total: 6
   Message-Id: <a2ea8fc83dd8b93cfd86.315532863@*> (glob)
   In-Reply-To: <patchbomb.315532860@*> (glob)
   References: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:03 +0000
   From: test
   To: foo
   
@@ -2388,10 +2448,11 @@  test outgoing:
   X-Mercurial-Series-Index: 4
   X-Mercurial-Series-Total: 6
   Message-Id: <240fb913fc1b7ff15ddb.315532864@*> (glob)
   In-Reply-To: <patchbomb.315532860@*> (glob)
   References: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:04 +0000
   From: test
   To: foo
   
@@ -2418,10 +2479,11 @@  test outgoing:
   X-Mercurial-Series-Index: 5
   X-Mercurial-Series-Total: 6
   Message-Id: <5d5ef15dfe5e7bd3a4ee.315532865@*> (glob)
   In-Reply-To: <patchbomb.315532860@*> (glob)
   References: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:05 +0000
   From: test
   To: foo
   
@@ -2449,10 +2511,11 @@  test outgoing:
   X-Mercurial-Series-Index: 6
   X-Mercurial-Series-Total: 6
   Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@*> (glob)
   In-Reply-To: <patchbomb.315532860@*> (glob)
   References: <patchbomb.315532860@*> (glob)
+  X-Mercurial-Series-Id: <patchbomb.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:06 +0000
   From: test
   To: foo
   
@@ -2487,10 +2550,11 @@  dest#branch URIs:
   Subject: [PATCH] test
   X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
   X-Mercurial-Series-Index: 1
   X-Mercurial-Series-Total: 1
   Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@*> (glob)
+  X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@*> (glob)
   User-Agent: Mercurial-patchbomb/* (glob)
   Date: Tue, 01 Jan 1980 00:01:00 +0000
   From: test
   To: foo