Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/282334

Change subject: Merge patch sets and any gerrit repos were involved
......................................................................

Merge patch sets and any gerrit repos were involved

Change-Id: I1130d2e01591f2b4d7259350837b7a836f808e0f
---
M repong/repong.php
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/34/282334/1

diff --git a/repong/repong.php b/repong/repong.php
index bc0d773..ba18bf7 100644
--- a/repong/repong.php
+++ b/repong/repong.php
@@ -68,6 +68,7 @@
        public function commit() {
                $message = 'Localisation updates from 
https://translatewiki.net.';
                $base = $this->meta['basepath'];
+               $gerritCommitted = false;
 
                foreach ( $this->config['repos'] as $name => $repo ) {
                        if ( $repo['type'] === 'git' ) {
@@ -81,6 +82,8 @@
                                $command = "cd $dir; git add .; " .
                                        "git commit -m '$message' || :; " .
                                        'git review -r origin -t L10n';
+                               
+                               $gerritCommitted = true;
                        } else {
                                throw new RuntimeException( "Unknown repo type" 
);
                        }
@@ -91,6 +94,19 @@
                        $process->setTimeout( 120 );
                        print $process->getOutput();
                }
+               
+               // Merge patch sets submitted to Wikimedia's Gerrit.
+               if ( $gerritCommitted ) {
+                       $command = "for i in `ssh l10n-...@gerrit.wikimedia.org 
-p 29418 ";
+                       $command .= "gerrit query --format=TEXT owner:l10n-bot 
status:open |";
+                       $command .= "grep '  url:' |cut -d/ -f5 |sort`; do ";
+                       $command .= "ssh l10n-...@gerrit.wikimedia.org -p 29418 
";
+                       $command .= "gerrit review \$i,1 --code-review 2 
--verified 2 --submit; done";
+                       $process = new Process( $command );
+                       $process->mustRun();
+                       $process->setTimeout( 120 );
+                       print $process->getOutput();
+               }
        }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/282334
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1130d2e01591f2b4d7259350837b7a836f808e0f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@kitano.nl>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to