Ticket #335 (closed enhancement: wontfix)

Opened 2 months ago

Last modified 1 month ago

request to update version.php

Reported by: markpea Assigned to: nobody
Priority: normal Milestone: 0.9.1
Component: general Version: 0.9.0
Severity: minor Keywords:
Cc: Patch Included: 0
Review Stage: reviewed

Description

I am trying to keep my test 0.91 version of Elgg up to date with the latest bug fixes by using svn. But it's made difficult because there's no way of knowing from the code itself what changeset it represents since version.php has not been updated since Dec 07. Would it be possible to insert the changeset number into version.php upon an update so that one can keep track of the current codebase and compare it to the latest bugfixes via changeset numbers? Ta.

Change History

04/07/08 14:11:40 changed by misja

  • status changed from new to closed.
  • resolution set to wontfix.
  • review_stage changed from unreviewed to reviewed.

Having a version number in trunk is in fact not correct, and should only get added when doing a release. You should be able to compare between svn tags easily, the issue tracker will be of great help too, see http://elgg.org/trac/browser -> View changes...

04/09/08 15:04:10 changed by justinr

I agree that you don't want to update the version.php file on every changeset. Perhaps a better solution would be to enable the svn:keywords property on the version.php file. Then create a couple of new variables in there to reflect the current revision number and check-out date.

$svn_release = '$Rev$';

$svn_date = '$Date$';

Note the single-quoted strings here to prevent PHP from thinking that $rev and $date are variables for its own consumption. But now, SVN will automatically update these values for you without any human intervention. This is something that could easily be checked by end-users (or plug-in writers, in code) and doesn't affect things that depend on the current version variable, since we'd definitely want to leave that alone and change it only by hand for releases.

04/09/08 18:07:31 changed by justinr

  • status changed from closed to reopened.
  • resolution deleted.

04/10/08 19:23:54 changed by markpea

I do like Justinr's idea. It would help to keep track of what release I was actually running (there's no other way). Does resolution deleted mean that you've done this Justinr ?

04/11/08 16:34:09 changed by justinr

No, I haven't fixed this (as I don't have write-access to the SVN). "resolution deleted" is apparently what happens when you reopen a closed ticket. The fix should be easy enough for them to implement though, if they want to do it. Unfortunately, I don't think that you can do this on just your local copy.

Additionally, It seems that $Rev$ doesn't actually get expanded to the full revision number of the current checkout, just the revision of the file. See here:

http://subversion.tigris.org/faq.html#version-value-in-source

So I'm not convinced that my resolution would actually work, either. Maybe I'm too used to CVS still. :)

04/14/08 07:40:44 changed by misja

  • status changed from reopened to closed.
  • resolution set to wontfix.

From what I understand the keyword expansion needs to get done on the client side. An option would be to have this type of solution implemented in nightly builds, but is be something to reconsider again when the 1.0 branch lands. Closing this report with wontfix for now again.