[PATCH 5 of 5 RFC] patchbomb: add support for a file that configures default To and CC

Yuya Nishihara yuya at tcha.org
Thu Jun 15 10:41:53 EDT 2017


On Wed, 14 Jun 2017 11:19:56 -0400, Augie Fackler wrote:
> 
> > On Jun 14, 2017, at 10:17, Yuya Nishihara <yuya at tcha.org> wrote:
> > 
> > On Tue, 13 Jun 2017 18:50:27 -0400, Augie Fackler wrote:
> >> 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.
> > 
> > Looks pretty nice.
> > 
> >>> @@ -3036,12 +3036,17 @@ Test hg email defaults settings:
> >>>> [devel.setsubscriptions]
> >>>> c or d = c-or-d at example.com
> >>>> a or b = a-or-b at example.com
> >>> +  > [foo.setsubscriptions]
> >>> +  > binary() = hates-binary-files at example.com
> > 
> > Perhaps the config syntax could be arbitrary_key:attr = value.
> > 
> >  hatebin:fileset = binary()
> >  hatebin:revset = keyword(binary)
> >  hatebin:cc = hates-binary-files at example.com
> 
> Hmm. This feels a little quirky to me somehow (though it's in-line with how we handle them in config files generally). Could we instead do something like this?
> 
> > [devel]
> > to = devel at example.com
> > cc = always-cc at example.com
> > 
> > [devel.hatebin]
> > fileset = binary()
> > revset = keyword(binary)
> > cc = hates-binary-files at example.com
> > 
> > [devel.a-or-b]
> > fileset = a or b
> > cc = a-or-b at example.com
> 
> That looks a little cleaner to me, but I don't feel especially strongly. Just seems like we may as well use the fact that we're not in a main config file to our advantage and use sections in a slightly clearer way...

This seems also good. I don't have strong opinion about :attr syntax, which
would be good for consistency with the main config, but implementation-wise
it isn't pretty.

> > fileset and revset can be quite long. We wouldn't want to write them as config
> > keys.
> > 
> > And I prefer using matcher patterns instead of fileset for consistency with
> > the other commands.
> 
> Should we name it `files` then, and if people want to use a set they can do the set: thing in-situ? That's fine with me (I just find filesets to be the best thing).
> 
> I can also add the revset match flavor, that seems nice.

Yeah, and 'revset' could be called as 'revs', too.


More information about the Mercurial-devel mailing list