[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Stop amending commits for branches with sub...

2017-10-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/380885 )

Change subject: make-wmf-branch: Stop amending commits for branches with 
submodules
..


make-wmf-branch: Stop amending commits for branches with submodules

In Ia31a9f1d, we tried to fix submodule support in branching so they
get branched properly as well. To do this, we had to make a commit
with some submodules being committed. To avoid noise and roll it into
the prior commit we'd done for .gitreview, we'd push the resulting
single commit to Gerrit.

Then I come along in I3ba2bb8f to stop mangling .gitreview on all
the extension branches because it was superfluous. However, that
meant that the *second* commit from before was now amending the
*last* commit prior to branching.

Confused yet?

Bug: T175324
Change-Id: I8a9c1a7094cb5f7be36c101498ddd7107522c2d6
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Thcipriani: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index fd7dc5a..3a233de 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -191,7 +191,11 @@
$this->chdir( $repo );
$this->runCmd( 'git', 'add', $submodule );
}
-   $this->runCmd( 'git', 'commit', '-q', '--amend', '-m', 
"Creating new {$newVersion} branch" );
+   $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 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a9c1a7094cb5f7be36c101498ddd7107522c2d6
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Stop amending commits for branches with sub...

2017-09-26 Thread Chad (Code Review)
Hello Thcipriani, Catrope, 20after4, Jforrester,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: make-wmf-branch: Stop amending commits for branches with 
submodules
..

make-wmf-branch: Stop amending commits for branches with submodules

In Ia31a9f1d, we tried to fix submodule support in branching so they
get branched properly as well. To do this, we had to make a commit
with some submodules being committed. To avoid noise and roll it into
the prior commit we'd done for .gitreview, we'd push the resulting
single commit to Gerrit.

Then I come along in I3ba2bb8f to stop mangling .gitreview on all
the extension branches because it was superfluous. However, that
meant that the *second* commit from before was now amending the
*last* commit prior to branching.

Confused yet?

Bug: T175324
Change-Id: I8a9c1a7094cb5f7be36c101498ddd7107522c2d6
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/85/380885/1

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index fd7dc5a..827bab7 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -191,7 +191,7 @@
$this->chdir( $repo );
$this->runCmd( 'git', 'add', $submodule );
}
-   $this->runCmd( 'git', 'commit', '-q', '--amend', '-m', 
"Creating new {$newVersion} branch" );
+   $this->runCmd( 'git', 'commit', '-q', '-m', "Creating 
new {$newVersion} branch" );
$this->runWriteCmd( 'git', 'push', 'origin', 
$newVersion );
} else {
$this->createBranch( $newVersion, true );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a9c1a7094cb5f7be36c101498ddd7107522c2d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Thcipriani 

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