For extensions I write, I don't update the version number every time I make a change because it's too much, always editing (even if automatically) and checking in the main file.
I have this process for releases though where I use Makefile to create a tag and packages: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Widgets/Makefile
I know it's far from perfect, but better then not having any because I'll either forget to create a tag (or will not do that properly) or will not be maintaining downloadable versions (this will hopefully be unnecessary if ExtensionDistributor will support extension tags).
There is probably a solution that can be done within the code - something that makes all included PHP files override the version if it's later then in main file - something like this in main file:
*$myExtensionRevision = $LastChangedRevision$; function updateRevision($file_revision) { global $myExtensionRevision;
if ($file_revision > $myExtensionRevision) { $myExtensionRevision = $file_revision; } }
**include_once('subfile1.php'); **include_once('subfile2.php'); * *$wgExtensionCredits['parserhook'][] = array( ... 'version' => '0.2.'.$myExtensionRevision, ... } *
and then in subfile1.php and subfile2.php
*updateRevision(**$LastChangedRevision$**)*
Still, it's only a convention and not a universal solution, more over it'll only work if revision updated at least one PHP file. Also if extension doesn't include all it's files or uses AutoLoader, then it will not be reliable.
Thank you,
Sergey
-- Sergey Chernyshev http://www.sergeychernyshev.com/
On Fri, Mar 27, 2009 at 5:59 AM, Gerard Meijssen gerard.meijssen@gmail.comwrote:
Hoi, The Cite extensions is two distinct extensions in the same directory..
In order to get the issue of supporting extensions under control, best practices have to be defined and implemented. Not having such a solution is not really an option because it breaks the ability to reliably support MediaWiki for stable versions and it breaks the ability to reliably use the same MediaWiki environment as the WMF projects. Thanks, Gerard
2009/3/27 Daniel Kinzler daniel@brightbyte.de
I'm guessing this may be because the new file was added after r37404, but the file registering the extension (and providing the revision number) wasn't changed at that time, which means the most recent revision of *that file* is still r37404. Special:Version doesn't really report the most recent revision of the extension as a whole, but that
of
the setup file (IIRC).
Indeed. It would be much nicer if it could report the *directories* revision number. Does SVN have a keyword substitution for this? Does SVN allow scripts/plugins for this type of thing? That would by quite useful.
-- daniel
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l