From patchwork Wed Jun 14 07:46:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [5, of, 5, RFC] patchbomb: add support for a file that configures default To and CC From: Denis Laxalde X-Patchwork-Id: 21370 Message-Id: <0975cf34-27f9-f3b0-ea4f-c198c92c6cef@laxalde.org> To: Augie Fackler , mercurial-devel@mercurial-scm.org Date: Wed, 14 Jun 2017 09:46:27 +0200 Augie Fackler a écrit : > Durham had the idea of a tweak to patchbomb that would let us not do https://www.mercurial-scm.org/wiki/Herald. > > I implemented filesets for the RFC, but I think we should probably also allow reset-based subscriptions too (e.g. "histedit" as a keyword or similar). I'd appreciate any feedback people have, since this was a quick project and it feels like it might have some real utility. > > I really like the idea! Another thing that'd be useful to me would be to have a "default" section in .hgemaildefaults so that one would not need to type "--to devel". Not sure how this could be formatted though. Having played with it locally, I noticed that with an "email.to" setting in hgrc, the --to option is no longer taken into account. To reproduce: From [test]: test diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t --- a/tests/test-patchbomb.t +++ b/tests/test-patchbomb.t @@ -3080,6 +3080,45 @@ the To line because it has a setsubscrip d +d +With an email.to configuration, the --to flag takes precedence: + $ hg email --date '1970-1-1 0:2' --to=devel --to=foo --test -r 10 --config patchbomb.publicurl= --config email.to=bob@example.com + From [test]: test + this patch series consists of 1 patches. + + Cc [c-or-d@example.com]: c-or-d@example.com + + 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: mercurial-devel@example.com + Cc: c-or-d@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 + This change modifies file b $ hg email --date '1970-1-1 0:2' --to=devel --test -r 1 --config patchbomb.publicurl=