r114432 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114431‎ | r114432 | r114433 >
Date:23:15, 22 March 2012
Author:reedy
Status:deferred (Comments)
Tags:
Comment:
Ping r114730

Most people wont need/want labs and integration
Modified paths:
  • /trunk/tools/code-utils/clone-all.php (modified) (history)

Diff [purge]

Index: trunk/tools/code-utils/clone-all.php
@@ -3,9 +3,8 @@
44 $gerrit = "gerrit.wikimedia.org";
55 $baseUrl = "ssh://$gerrit:29418"; // "https://$gerrit/r/p" if you have no ssh access
66
7 -$skipRepositories = array( 'test/*', 'operations/*', 'analytics*' );
 7+$skipRepositories = array( 'test/*', 'operations/*', 'analytics*', 'labs/*', 'integration/*' );
88
9 -
109 $command = <<<EOF
1110 wget https://$gerrit/r/gerrit/rpc/ProjectAdminService --post-data='{"jsonrpc":"2.0","method":"visibleProjects","params":[],"id":1}' --header "Content-Type: application/json; charset=utf-8" --header "Accept: application/json" -O -
1211 EOF;
@@ -23,24 +22,24 @@
2423 foreach ( $projects as $project ) {
2524 $repo = $project->name->name;
2625 print "$repo\n";
27 -
 26+
2827 if ( strpos( $project->description, "DON'T USE" ) !== false ) {
2928 echo " Don't use, skipped\n";
3029 continue;
3130 }
32 -
 31+
3332 foreach ( $skipRepositories as $skip ) {
3433 if ( fnmatch( $skip, $repo, FNM_CASEFOLD ) ) {
3534 echo " Skipped\n";
3635 continue 2;
3736 }
3837 }
39 -
 38+
4039 if ( file_exists( "$repo/.git" ) ) {
4140 echo " There's already a repository at $repo\n";
4241 continue;
4342 }
44 -
 43+
4544 $start = microtime( true );
4645 passthru( "git clone " . escapeshellarg( "$baseUrl/$repo.git" ) . " " . escapeshellarg( $repo ), $exitCode );
4746 $end = microtime( true );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114430Script to clone all projects from https://gerrit.wikimedia.org/r/#admin,projects...platonides20:34, 22 March 2012

Comments

#Comment by Krinkle (talk | contribs)   23:41, 22 March 2012

Maybe whitelist mediawiki/* ?

#Comment by Krinkle (talk | contribs)   23:43, 22 March 2012

Or skip all except mediawiki/core and mediawiki/extensions/*. People most likely don't need analytics/*, mediawiki/tools either

#Comment by Platonides (talk | contribs)   15:09, 23 March 2012

We have no labs/* yet.

What did you mean with r114730 ?

#Comment by Reedy (talk | contribs)   15:43, 23 March 2012

Typo for r114430

#Comment by Reedy (talk | contribs)   15:44, 23 March 2012

And yes we do, there is "labs/private" in the list

#Comment by Platonides (talk | contribs)   16:26, 23 March 2012

No, there's not. Different user permissions?

#Comment by Platonides (talk | contribs)   16:28, 23 March 2012

Hmmm... I had cloned labs/private some months ago, and it was there, as you claim. It can't find it now, though.

Status & tagging log