Patchwork [2,of,3,v2] patchbomb: lay test groundwork for some new functionality

login
register
mail settings
Submitter Augie Fackler
Date June 15, 2017, 3:16 a.m.
Message ID <85fa6c9f000f374bebd4.1497496593@imladris.local>
Download mbox | patch
Permalink /patch/21383/
State Changes Requested
Headers show

Comments

Augie Fackler - June 15, 2017, 3:16 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1497385899 14400
#      Tue Jun 13 16:31:39 2017 -0400
# Node ID 85fa6c9f000f374bebd40c401e4d0945d2194e1f
# Parent  a2d6d99356a75d5957767d106684652752234931
patchbomb: lay test groundwork for some new functionality

These email blobs are so big, it'll make things easier to review to
add this, then implement the feature so the behavior variation is
obvious.

Patch

diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
--- a/tests/test-patchbomb.t
+++ b/tests/test-patchbomb.t
@@ -3067,3 +3067,155 @@  multiple heads are missing at public
   [255]
 
 #endif
+
+Test hg email defaults settings:
+  $ cat >> .hgemaildefaults <<EOF
+  > [devel]
+  > to = mercurial-devel@example.com
+  > [devel.setsubscriptions]
+  > c or d = c-or-d@example.com
+  > a or b = a-or-b@example.com
+  > EOF
+This change modifies file d
+  $ hg email --date '1970-1-1 0:2' --to=devel --test -r 10 --config patchbomb.publicurl=
+  From [test]: test
+  this patch series consists of 1 patches.
+  
+  
+  displaying [PATCH] dd ...
+  Content-Type: text/plain; charset="us-ascii"
+  MIME-Version: 1.0
+  Content-Transfer-Encoding: 7bit
+  Subject: [PATCH] dd
+  X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af
+  X-Mercurial-Series-Index: 1
+  X-Mercurial-Series-Total: 1
+  Message-Id: <3b6f1ec9dde933a40a11.*@*> (glob)
+  X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.*@*> (glob)
+  User-Agent: Mercurial-patchbomb/* (glob)
+  Date: Thu, 01 Jan 1970 00:02:00 +0000
+  From: test
+  To: devel
+  
+  # HG changeset patch
+  # User test
+  # Date 5 0
+  #      Thu Jan 01 00:00:05 1970 +0000
+  # Branch test
+  # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af
+  # Parent  2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
+  dd
+  
+  diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d
+  --- a/d	Thu Jan 01 00:00:04 1970 +0000
+  +++ b/d	Thu Jan 01 00:00:05 1970 +0000
+  @@ -1,1 +1,2 @@
+   d
+  +d
+  
+This change modifies file b
+  $ hg email --date '1970-1-1 0:2' --to=devel --test -r 1 --config patchbomb.publicurl=
+  From [test]: test
+  this patch series consists of 1 patches.
+  
+  
+  displaying [PATCH] b ...
+  Content-Type: text/plain; charset="us-ascii"
+  MIME-Version: 1.0
+  Content-Transfer-Encoding: 7bit
+  Subject: [PATCH] b
+  X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
+  X-Mercurial-Series-Index: 1
+  X-Mercurial-Series-Total: 1
+  Message-Id: <97d72e5f12c7e84f8506.*@*> (glob)
+  X-Mercurial-Series-Id: <97d72e5f12c7e84f8506.*@*> (glob)
+  User-Agent: Mercurial-patchbomb/* (glob)
+  Date: Thu, 01 Jan 1970 00:02:00 +0000
+  From: test
+  To: devel
+  
+  # HG changeset patch
+  # User test
+  # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
+  # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
+  # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
+  b
+  
+  diff -r 8580ff50825a -r 97d72e5f12c7 b
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/b	Thu Jan 01 00:00:02 1970 +0000
+  @@ -0,0 +1,1 @@
+  +b
+  
+  $ hg email --date '1970-1-1 0:2' --to=devel --to=specific-person@example.com \
+  > --cc this-person-also@example.com --test -r '1+10' --config patchbomb.publicurl=
+  From [test]: test
+  this patch series consists of 2 patches.
+  
+  (optional) Subject: [PATCH 0 of 2] 
+  
+  displaying [PATCH 1 of 2] b ...
+  Content-Type: text/plain; charset="us-ascii"
+  MIME-Version: 1.0
+  Content-Transfer-Encoding: 7bit
+  Subject: [PATCH 1 of 2] b
+  X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
+  X-Mercurial-Series-Index: 1
+  X-Mercurial-Series-Total: 2
+  Message-Id: <97d72e5f12c7e84f8506.*@*> (glob)
+  X-Mercurial-Series-Id: <97d72e5f12c7e84f8506.*@*> (glob)
+  User-Agent: Mercurial-patchbomb/* (glob)
+  Date: Thu, 01 Jan 1970 00:02:00 +0000
+  From: test
+  To: devel, specific-person@example.com
+  Cc: this-person-also@example.com
+  
+  # HG changeset patch
+  # User test
+  # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
+  # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
+  # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
+  b
+  
+  diff -r 8580ff50825a -r 97d72e5f12c7 b
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/b	Thu Jan 01 00:00:02 1970 +0000
+  @@ -0,0 +1,1 @@
+  +b
+  
+  displaying [PATCH 2 of 2] dd ...
+  Content-Type: text/plain; charset="us-ascii"
+  MIME-Version: 1.0
+  Content-Transfer-Encoding: 7bit
+  Subject: [PATCH 2 of 2] dd
+  X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af
+  X-Mercurial-Series-Index: 2
+  X-Mercurial-Series-Total: 2
+  Message-Id: <3b6f1ec9dde933a40a11.*@*> (glob)
+  X-Mercurial-Series-Id: <97d72e5f12c7e84f8506.*@*> (glob)
+  In-Reply-To: <97d72e5f12c7e84f8506.*@*> (glob)
+  References: <97d72e5f12c7e84f8506.*@*> (glob)
+  User-Agent: Mercurial-patchbomb/* (glob)
+  Date: Thu, 01 Jan 1970 00:02:01 +0000
+  From: test
+  To: devel, specific-person@example.com
+  Cc: this-person-also@example.com
+  
+  # HG changeset patch
+  # User test
+  # Date 5 0
+  #      Thu Jan 01 00:00:05 1970 +0000
+  # Branch test
+  # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af
+  # Parent  2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
+  dd
+  
+  diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d
+  --- a/d	Thu Jan 01 00:00:04 1970 +0000
+  +++ b/d	Thu Jan 01 00:00:05 1970 +0000
+  @@ -1,1 +1,2 @@
+   d
+  +d
+