20after4 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/192868
Change subject: Add a rudimentary resume feature to make-wmf-branch
......................................................................
Add a rudimentary resume feature to make-wmf-branch
Change-Id: Ifb26a031616f82b263197182898ad751e331a362
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release
refs/changes/68/192868/1
diff --git a/make-wmf-branch/MakeWmfBranch.php
b/make-wmf-branch/MakeWmfBranch.php
index a45db89..c5c7e07 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -6,13 +6,15 @@
var $specialExtensions, $branchedExtensions, $branchedSkins, $patches;
var $baseRepoPath, $anonRepoPath;
var $noisy;
+ var $lastSuccessfulRepo = null;
+ var $resumePoint = null;
+ var $skipping = false;
function __construct( $newVersion, $oldVersion ) {
$this->newVersion = $newVersion;
$this->oldVersion = $oldVersion;
$codeDir = dirname( __FILE__ );
$buildDir = sys_get_temp_dir() . '/make-wmf-branch';
-
require( "{$codeDir}/default.conf" );
if ( file_exists( "{$codeDir}/local.conf" ) ) {
require( "{$codeDir}/local.conf" );
@@ -73,10 +75,15 @@
function croak( $msg ) {
fwrite( STDERR, "$msg\n" );
+ fwrite( STDERR, "\n====\n last successful repo =
".$this->lastSuccessfulRepo."\n====\n");
exit( 1 );
}
function execute( $clonePath ) {
+ if ($this->resumePoint) {
+ $this->skipping=true;
+ }
+
$this->setupBuildDirectory();
foreach( $this->branchedExtensions as $ext ) {
$this->branchRepo( "extensions/{$ext}" );
@@ -100,6 +107,14 @@
}
function branchRepo( $path ) {
+
+ if ($this->skipping) {
+ if ($this->resumePoint == $path) {
+ $this->skipping = false;
+ } else {
+ return;
+ }
+ }
$repo = basename( $path );
$this->runCmd( 'git', 'clone', '-q',
"{$this->baseRepoPath}/{$path}.git", $repo );
$this->chdir( $repo );
@@ -112,6 +127,7 @@
$this->runWriteCmd( 'git', 'push', 'origin', $newVersion );
$this->chdir( $this->buildDir );
+ $this->lastSuccessfulRepo=$path;
}
function branchWmf( $clonePath ) {
--
To view, visit https://gerrit.wikimedia.org/r/192868
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb26a031616f82b263197182898ad751e331a362
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: 20after4 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits