From ca24f5c492e75b3edc627967f6a709c21020c6ab Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Tue, 26 Mar 2013 13:23:20 +0100 Subject: [PATCH] Describe Prolog related features in Gerrit 2.6 release notes Change-Id: I726d4cad50c0d876e32eb2498ddbbc871d5a8df7 Signed-off-by: Edwin Kempin --- Documentation/prolog-cookbook.txt | 1 + ReleaseNotes/ReleaseNotes-2.6.txt | 34 +++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Documentation/prolog-cookbook.txt b/Documentation/prolog-cookbook.txt index d832b051fa..7912cf26a1 100644 --- a/Documentation/prolog-cookbook.txt +++ b/Documentation/prolog-cookbook.txt @@ -269,6 +269,7 @@ NOTE: If `MyProject` doesn't define its own `submit_rule` Gerrit will invoke the default implementation of submit rule that is named `gerrit:default_submit` and its result will be filtered as described above. +[[HowToWriteSubmitType]] How to write submit type ------------------------ Writing custom submit type logic in Prolog is the similar top diff --git a/ReleaseNotes/ReleaseNotes-2.6.txt b/ReleaseNotes/ReleaseNotes-2.6.txt index a4ddcca125..829f9160a9 100644 --- a/ReleaseNotes/ReleaseNotes-2.6.txt +++ b/ReleaseNotes/ReleaseNotes-2.6.txt @@ -33,8 +33,12 @@ Review UI * New 'Rebase If Necessary' submit type. This is similar to cherry pick, but honors change dependency information. -* Submit type displayed per-change in the info block. -* Submit type selectable per-change by `submit_type` Prolog rules. + +* The submit type that is used for submitting a change is shown on the + change screen in the info block. ++ +This is useful because the submit type of a change can now be +link:#submit-type-from-prolog[controlled by Prolog]. * The rebase button is hidden when the patch set is current. @@ -213,6 +217,32 @@ Plugins plugin which is included as a core plugin in the Gerrit distribution and can be installed during site initialization. +Prolog +~~~~~~ +[[submit-type-from-prolog]] +* link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/prolog-cookbook.html#HowToWriteSubmitType[ + Support controlling the submit type for changes from Prolog] ++ +Similarly like the `submit_rule` there is now a `submit_type` predicate +which returns the allowed submit type for a change. When the +`submit_type` predicate is not provided in the `rules.pl` then the +project default submit type is used for all changes of that project. ++ +Filtering the results of the `submit_type` is also supported in the +same way like filtering the results of the `submit_rule`. Using a +`submit_type_filter` predicate one can enforce a particular submit type +from a parent project. + +* Plugins can contribute Prolog facts/predicates from Java. + +* link:https://code.google.com/p/gerrit/issues/detail?id=288[Issue 288]: + Expose basic commit statistics for the Prolog rule engine ++ +A new method `gerrit:commit_stats(-Files,-Insertions, -Deletions)` was +added. + +* A new `max_with_block` predicate was added for more convenient usage + Email ~~~~~ * link:https://code.google.com/p/gerrit/issues/detail?id=1531[Issue 1531]: