Gitweb -> Gitblit
authorAlex Monk <krenair@gmail.com>
Fri, 7 Jun 2013 22:03:18 +0000 (23:03 +0100)
committerAlex Monk <krenair@gmail.com>
Fri, 7 Jun 2013 22:05:13 +0000 (23:05 +0100)
Change-Id: I54387a6ca5ed020e66594d4bf410a042d4ae010f

includes/DefaultSettings.php
includes/GitInfo.php
includes/normal/README
maintenance/dictionary/mediawiki.dic
tests/selenium/installer/README.txt

index 58eb3d7..06eba95 100644 (file)
@@ -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 }
index a54b807..407b3cb 100644 (file)
@@ -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 );
                        }
index 993642e..0f718d2 100644 (file)
@@ -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.
 
index 59ea18f..22452fd 100644 (file)
@@ -1663,9 +1663,9 @@ ggp
 ghostscript
 gimpbaseenums
 git
+gitblit
 gitdir
 github
-gitweb
 global
 globalauth
 globalblock
index bc880a8..4296f79 100644 (file)
@@ -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