Chad has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/404600 )
Change subject: make-wmf-branch: Stop committing weird sub-submodule branching
......................................................................
make-wmf-branch: Stop committing weird sub-submodule branching
It's ok to keep creating these branches, but the logic for adding
them as auto-tracked submodules is fragile and has broken several
times over the years.
The drawback? SWAT deploys for the sub-submodules require manual
backports. This sucks, but it sucks less than the tech debt and
isn't any worse than how we used to do things before auto-updating
submodules were used.
Change-Id: I00301d8ea2d003b8d0668a8db998d3d1df34e195
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 3 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release
refs/changes/00/404600/1
diff --git a/make-wmf-branch/MakeWmfBranch.php
b/make-wmf-branch/MakeWmfBranch.php
index b2a1ead..98363fd 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -148,12 +148,9 @@
}
}
- function createBranch( $branchName, $doPush=true ) {
+ function createBranch( $branchName ) {
$this->runCmd( 'git', 'checkout', '-q', '-b', $branchName );
-
- if ( $doPush == true ) {
- $this->runWriteCmd( 'git', 'push', 'origin',
$branchName );
- }
+ $this->runWriteCmd( 'git', 'push', 'origin', $branchName );
}
function branchRepo( $path ) {
@@ -169,7 +166,6 @@
$newVersion = $this->branchPrefix . $this->newVersion;
if ( isset( $this->branchedSubmodules[$path] ) ) {
- $this->createBranch( $newVersion, false );
foreach ( (array)$this->branchedSubmodules[$path] as
$submodule ) {
$this->runCmd( 'git', 'submodule', 'update',
'--init', $submodule );
$this->chdir( $submodule );
@@ -179,17 +175,9 @@
// may be inside a subdirectory
$this->chdir( $this->buildDir );
$this->chdir( $repo );
- $this->runCmd( 'git', 'add', $submodule );
}
- $diffRet = 0;
- passthru( '/usr/bin/git diff --cached --no-ext-diff
--quiet', $diffRet );
- if ( $diffRet > 0 ) {
- $this->runCmd( 'git', 'commit', '-q', '-m',
"Creating new {$newVersion} branch" );
- }
- $this->runWriteCmd( 'git', 'push', 'origin',
$newVersion );
- } else {
- $this->createBranch( $newVersion, true );
}
+ $this->createBranch( $newVersion );
$this->chdir( $this->buildDir );
}
--
To view, visit https://gerrit.wikimedia.org/r/404600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I00301d8ea2d003b8d0668a8db998d3d1df34e195
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits