[Libreoffice-commits] dev-tools.git: 3 commits - ciabot/run-libreoffice-ciabot.pl scripts/gerrit-filter-domain

Miklos Vajna vmiklos at collabora.co.uk
Fri Mar 14 03:29:54 PDT 2014


 ciabot/run-libreoffice-ciabot.pl |   39 +++++++++++++++++++++++++++++++++++++--
 scripts/gerrit-filter-domain     |    2 +-
 2 files changed, 38 insertions(+), 3 deletions(-)

New commits:
commit 75d8d6db694575272f63894ab5b8e973f3147a20
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Mar 5 09:50:30 2014 +0100

    gerrit-filter-domain: print URL for skipped changes as well
    
    Change-Id: Ia4a6609791ababe8ae9edfd87139728c5053ec14

diff --git a/scripts/gerrit-filter-domain b/scripts/gerrit-filter-domain
index 9f353c3..69eca4c 100755
--- a/scripts/gerrit-filter-domain
+++ b/scripts/gerrit-filter-domain
@@ -74,7 +74,7 @@ def main(argv):
     print()
     print("Skipped %s changes:" % len(skippedChanges))
     for i in skippedChanges:
-        print("%s: %s" % (i[0]['number'], i[1]))
+        print("http://gerrit.libreoffice.org/%s: %s" % (i[0]['number'], i[1]))
 
 if __name__ == "__main__":
     try:
commit 475eb0d0590854520a5d801a471f12824e92cea1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Mar 4 16:32:03 2014 +0100

    fix the ciabot script after latest changes

diff --git a/ciabot/run-libreoffice-ciabot.pl b/ciabot/run-libreoffice-ciabot.pl
index 8fa65c9..2ca4b9f 100755
--- a/ciabot/run-libreoffice-ciabot.pl
+++ b/ciabot/run-libreoffice-ciabot.pl
@@ -118,13 +118,15 @@ sub report($$$) {
                                 {
                                     qx(perl -I $cwd $cwd/sigui-bugzilla.pl $repo $_ $branch_name);
                                 } else {
-                                    next if ( ! is_valid_bugzilla_commit( $repo, $branch_name ) );
-                                    qx($ciabot $repo $_ $branch_name $ciaproxy);
+                                    if ( is_valid_bugzilla_commit( $repo, $branch_name ) ) {
+                                        qx($ciabot $repo $_ $branch_name $ciaproxy);
+                                    }
                                     qx(perl -I $cwd $cwd/libreoffice-bugzilla.pl $repo $_ $branch_name);
                                 }
                             } else {
-                                next if ( ! is_valid_bugzilla_commit( $repo, $branch_name ) );
-                                print "$ciabot '$repo' '$_' '$branch_name' $ciaproxy\n";
+                                if ( is_valid_bugzilla_commit( $repo, $branch_name ) ) {
+                                    print "$ciabot '$repo' '$_' '$branch_name' $ciaproxy\n";
+                                }
                                 print "perl -I $cwd $cwd/libreoffice-bugzilla.pl '$repo' '$_' '$branch_name'\n";
                             }
                         }
commit 3f17397d609e846d4a3b7c859378fa8c1a0de070
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Mon Mar 3 14:20:28 2014 +0000

    Filter branches for automatic bugzilla reports.
    
    Introduces a much stricter branch filter for the 'core' repository.
    Now it just reports changes for libreoffice-[^/]* and master.

diff --git a/ciabot/run-libreoffice-ciabot.pl b/ciabot/run-libreoffice-ciabot.pl
index 689cb36..8fa65c9 100755
--- a/ciabot/run-libreoffice-ciabot.pl
+++ b/ciabot/run-libreoffice-ciabot.pl
@@ -24,6 +24,13 @@ sub error($) {
     print STDERR "$message\n";
 }
 
+#
+# Get a list of filtered branch HEADs
+#
+# Gets all branches, except HEAD.
+#
+# @returns \%{ branch name => git branch head hashval }
+#
 sub get_branches() {
     my %branches;
     if ( open REFS, "git show-ref |" ) {
@@ -44,10 +51,34 @@ sub get_branches() {
     return \%branches;
 }
 
+#
+# Should we generate Bugzilla comments?
+#
+# Report all commits for all repositories except 'core'. For 'core'
+# just report libreoffice-* and master branches to Bugzilla.
+#
+# @returns true, if this commit should be reported to Bugzilla.
+#
+sub is_valid_bugzilla_commit($$) {
+   my ( $repo, $branch ) = @_;
+   return 1 if ( $repo ne 'core' );
+   return ( $branch =~ /^(libreoffice-[^\/]*|master)$/ );
+}
+
 sub timestamp() {
         return strftime("[%Y-%m-%d %H:%M:%S]", localtime);
 }
 
+#
+# Report all branch changes to IRC and bugzilla.
+#
+# We just report changes filtered by is_valid_bugzilla_report to Bugzilla
+# but inform IRC off all changes.
+#
+# $1 = repository name
+# $2 = hashref of old branch heads (@see get_branches).
+# $3 = hashref of new branch heads (@see get_branches).
+#
 sub report($$$) {
     my ( $repo, $old_ref, $new_ref ) = @_;
     my %old = %{$old_ref};
@@ -87,10 +118,12 @@ sub report($$$) {
                                 {
                                     qx(perl -I $cwd $cwd/sigui-bugzilla.pl $repo $_ $branch_name);
                                 } else {
+                                    next if ( ! is_valid_bugzilla_commit( $repo, $branch_name ) );
                                     qx($ciabot $repo $_ $branch_name $ciaproxy);
                                     qx(perl -I $cwd $cwd/libreoffice-bugzilla.pl $repo $_ $branch_name);
                                 }
                             } else {
+                                next if ( ! is_valid_bugzilla_commit( $repo, $branch_name ) );
                                 print "$ciabot '$repo' '$_' '$branch_name' $ciaproxy\n";
                                 print "perl -I $cwd $cwd/libreoffice-bugzilla.pl '$repo' '$_' '$branch_name'\n";
                             }


More information about the Libreoffice-commits mailing list