Page MenuHomePhabricator

Provide the git info on action=query&meta=siteinfo
Closed, ResolvedPublic

Description

On [[Special:Version]] it is shown the following:
+-----------+--------------------+

ProductVersion

+-----------+--------------------+

MediaWiki1.20wmf1 (3e1bae7)

+-----------+--------------------+

...

Prior to git migration, there was an SVN revision number instead of the code "3e1bae7", and it was possible to get it from API by using the "rev" property in a query such as this:
https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&format=jsonfm

Now that MW is uses Git, there doesn't seems to be a way to get the "3e1bae7" because the "rev" is not defined.

The relevant code seems to be at
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/api/ApiQuerySiteinfo.php;h=e11d1105262af5ec919568c1240067a9cfe94558;hb=HEAD#l123

Could someone add an analogous code which would result in things such as "3e1bae7"?


Version: 1.20.x
Severity: normal

Details

Reference
bz36453

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:28 AM
bzimport set Reference to bz36453.
bzimport added a subscriber: Unknown Object (MLST).

[[Special:Version]] now shows "MediaWiki 1.20wmf1 (82f3370)" with 82f3370 linked to a non-existent revision. Extensions are linked, though and the links are working.

Exposing this information via the API is probably necessary since the core and extensions don't all pull from the same repository.