"Chad" <innocentkiller(a)gmail.com> wrote in message
news:5924f50a0904220554n32c3a4ecrd1cbc8cebcd74cb0@mail.gmail.com...
On Wed, Apr 22, 2009 at 7:12 AM, Mark Clements
(HappyDog)
<gmane(a)kennel17.co.uk> wrote:
>
[Description of WikiDB implementation of revision handling SNIPPED]
Perhaps we should add a "GetCredits" hook, to be called on
Special:Version
in order to get the credits info for the extension? If the hook is not
found, or returns false, then the info in $wgExtensionCredits for that
extension is used, otherwise the array returned from the function (which
is
in th same format) will be used instead. This would mean that the
extension
could use this function to include() all available files in order to get
the
revision number, but wouldn't need to include them on normal pages (thus
avoiding the performance hit). Wouldn't solve the problem of non-PHP
files
being updated, but would solve the rest.
Not sure it's worth it :-\ What's wrong with just giving version numbers
that make sense, rather than relying on the revision number which isn't
indicative of anything?
It means a lot more admin overhead, having to update a version file
(wherever it is) whenever you make a change, and also that you may often
forget to bump the version number, particularly when making minor tweaks.
This is not so much of a problem when you are in charge of the release
schedule, as you can build a version number update into your release
process, but if the code is being pulled in real-time for a repository, then
this doesn't work as each individual revision needs to be considered a
separate version and if you forget to update the version with every single
commit, then the versioning becomes useless. This is really something that
should be automated - humans are rubbish at this kind of thing!
For WikiDB I have adopted a simple approach. The version number is
incremented when there are potentially incompatible changes made (or changes
that require an update script to be run) and the revision is always the
latest repository revision of the code. I am currently on v2 r177, for
example. The revision number is not indicative of much, but it does
uniquely identify a release and it does tell you whether you are running the
latest version, and to be honest these two numbers tell you pretty much
anything you need to know about the extension's version. The only problem
is making sure that the revision is always up-to-date, which is solved (at
least in this case) by the method I described.
- Mark Clements (HappyDog)