From a1f1ccee356e329e79be1b380214c84c0f389063 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Fri, 7 Jun 2013 23:03:18 +0100 Subject: [PATCH] Gitweb -> Gitblit Change-Id: I54387a6ca5ed020e66594d4bf410a042d4ae010f --- includes/DefaultSettings.php | 5 +++-- includes/GitInfo.php | 5 +++-- includes/normal/README | 2 +- maintenance/dictionary/mediawiki.dic | 2 +- tests/selenium/installer/README.txt | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 58eb3d7ec3..06eba95003 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5053,12 +5053,13 @@ $wgGitBin = '/usr/bin/git'; * The value is the replacement for the key (it can contain $1, etc.) * %h will be replaced by the short SHA-1 (7 first chars) and %H by the * full SHA-1 of the HEAD revision. + * %r will be replaced with a URL-encoded version of $1. * * @since 1.20 */ $wgGitRepositoryViewers = array( - 'https://gerrit.wikimedia.org/r/p/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H', - 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H', + 'https://gerrit.wikimedia.org/r/p/(.*)' => 'https://git.wikimedia.org/commit/%r/%H', + 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' => 'https://git.wikimedia.org/commit/%r/%H', ); /** @} */ # End of maintenance } diff --git a/includes/GitInfo.php b/includes/GitInfo.php index a54b8073bd..407b3cb43c 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -194,12 +194,13 @@ class GitInfo { } foreach ( self::getViewers() as $repo => $viewer ) { $pattern = '#^' . $repo . '$#'; - if ( preg_match( $pattern, $url ) ) { + if ( preg_match( $pattern, $url, $matches ) ) { $viewerUrl = preg_replace( $pattern, $viewer, $url ); $headSHA1 = $this->getHeadSHA1(); $replacements = array( '%h' => substr( $headSHA1, 0, 7 ), - '%H' => $headSHA1 + '%H' => $headSHA1, + '%r' => urlencode( $matches[1] ), ); return strtr( $viewerUrl, $replacements ); } diff --git a/includes/normal/README b/includes/normal/README index 993642ec75..0f718d2c58 100644 --- a/includes/normal/README +++ b/includes/normal/README @@ -48,7 +48,7 @@ grains of salt. There's an experimental PHP extension module which wraps the ICU library's normalization functions. This is *MUCH* faster than doing this work in pure -PHP code. This is at https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary. +PHP code. This is at https://git.wikimedia.org/summary/mediawiki%2Fextensions%2Fnormal.git. It is used by the WMF, which currently runs PHP 5.3.10 on Linux. It hasn't been thoroughly tested on other configurations, but may work. diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index 59ea18f7f5..22452fd4fd 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -1663,9 +1663,9 @@ ggp ghostscript gimpbaseenums git +gitblit gitdir github -gitweb global globalauth globalblock diff --git a/tests/selenium/installer/README.txt b/tests/selenium/installer/README.txt index bc880a8ba8..4296f79cd1 100644 --- a/tests/selenium/installer/README.txt +++ b/tests/selenium/installer/README.txt @@ -1,6 +1,6 @@ == Details== -Automated Selenium test scripts written for MediaWiki Installer is available at https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=tree;f=tests/selenium/installer;hb=HEAD. +Automated Selenium test scripts written for MediaWiki Installer is available at https://git.wikimedia.org/tree/mediawiki%2Fcore.git/HEAD/tests%2Fselenium%2Finstaller. Detailed test cases available at http://www.mediawiki.org/wiki/New_installer/Test_plan. Version : MediaWiki 1.18alpha -- 2.20.1