[PATCH RFC 0/7] Bug fixes and preparation for example hook

Keller, Jacob E jacob.e.keller at intel.com
Thu Mar 20 14:45:55 PDT 2014

I am going to send a v2 of this series including the example hook I
referenced, as I have fixed several issues with this. In addition I
found some bugs with the current set of patches you pushed to devel, but
this series should clean them up too.


On Wed, 2014-03-19 at 15:46 -0700, Jacob Keller wrote:
> I am currently working on a hook which can automatically detect which project a
> patch applies to, if given proper index information in the patch diffs. The
> following sequence of patches are the required changes to the core to make this
> work, as well as a few bug fixes and general improvements.
> The first patch just renames the email configuration variable in line with
> request from Artem.
> The second patch I am not sure which is better, allow default pcfg_path or not
> allow default pcfg_branch. I think it's ok to force branch and path for each
> project.
> In line with how aiaiai-email-test-patchset works, change semantics for hooks
> so that they shouldn't exit with non-zero unless they have an internal error.
> In addition, we should call the hook slightly later in the file and add some
> more verbose warnings.
> Next, we begin a sequence of additional features, that my example hook I am
> going to propose will be able to work.
> First, the ability to specify a base commit, similar to how my old grep-log for
> subject code did. However, I have a much more robust method for finding the
> base commit in mind.
> Next, add the ability for the hook to cancel patch testing, by adding a
> boolean. I could go with a better name, but I couldn't think of one, so please
> provide an idea if you have one.
> Finally, explain best practice for hooks using non-standard configuration
> variables. There really is nothing we can or should do to stop a hook author,
> but it is good to warn about it.
> I am hoping to finish testing against my idea for an example hook that can
> automatically determine what project the patch applies to.
> Jacob Keller (7):
>   doc: rename CONFIGURATION to configuration.txt
>   email: don't allow pcfg_branch to default
>   dispatcher: check of hook returns error
>   config: add canonical_url variable for future use
>   email: add support for X-Aiaiai-Base-Commit
>   email: add support for X-Aiaiai-Cancel-Email-Test-Patchset
>   doc: add section explaining hook configuration variables
>  doc/email/{CONFIGURATION => configuration.txt} | 36 +++++++++++++++++++++-----
>  doc/email/example-aiaiai.cfg                   | 24 ++++++++++-------
>  email/aiaiai-email-dispatcher-helper           | 19 +++++++++-----
>  email/aiaiai-email-sh-functions                | 22 +++++++---------
>  email/aiaiai-email-test-patchset               | 20 +++++++++++++-
>  5 files changed, 86 insertions(+), 35 deletions(-)
>  rename doc/email/{CONFIGURATION => configuration.txt} (87%)

More information about the aiaiai mailing list