Last modified: 2014-02-25 19:50:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37649, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35649 - Special:Version doesn't list hashes of extensions checked out from git
Special:Version doesn't list hashes of extensions checked out from git
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.19
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 35278
  Show dependency treegraph
 
Reported: 2012-04-02 17:28 UTC by Sam Reed (reedy)
Modified: 2014-02-25 19:50 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2012-04-02 17:28:56 UTC
Testing head, any extensions that are from the git repo don't get version hashes, but the SVN ones do.

Oversight?
Comment 1 Sam Reed (reedy) 2012-04-02 19:04:24 UTC
I guess it is:

	/**
	 * Return a string of the MediaWiki version with SVN revision if available.
	 *
	 * @param $flags String
	 * @return mixed
	 */
	public static function getVersion( $flags = '' ) {
		global $wgVersion, $IP;
		wfProfileIn( __METHOD__ );

		$info = self::getSvnInfo( $IP );
		if ( !$info ) {
			$version = $wgVersion;
		} elseif( $flags === 'nodb' ) {
			$version = "$wgVersion (r{$info['checkout-rev']})";
		} else {
			$version = $wgVersion . ' ' .
				wfMsg(
					'version-svn-revision',
					isset( $info['directory-rev'] ) ? $info['directory-rev'] : '',
					$info['checkout-rev']
				);
		}

		wfProfileOut( __METHOD__ );
		return $version;
	}


vs for core:

	/**
	 * Return a wikitext-formatted string of the MediaWiki version with a link to
	 * the SVN revision or the git SHA1 of head if available.
	 * Git is prefered over Svn
	 * The fallback is just $wgVersion
	 *
	 * @return mixed
	 */
	public static function getVersionLinked() {
		global $wgVersion;
		wfProfileIn( __METHOD__ );

		if( $gitVersion = self::getVersionLinkedGit() ) {
			$v = $gitVersion;
		} elseif( $svnVersion = self::getVersionLinkedSvn() ) {
			$v = $svnVersion;
		} else {
			$v = $wgVersion; // fallback
		}

		wfProfileOut( __METHOD__ );
		return $v;
	}
Comment 2 Alexandre Emsenhuber [IAlex] 2012-04-05 15:15:45 UTC
Fix pending review in Git changeset #4332.
Comment 3 Alexandre Emsenhuber [IAlex] 2012-04-05 15:16:29 UTC
Gerrit change #4332 is better :)
Comment 4 Sam Reed (reedy) 2012-04-05 16:08:57 UTC
Yaay :)
Comment 5 Alexandre Emsenhuber [IAlex] 2012-04-05 16:09:28 UTC
And merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links