Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-1.x-dev
Component:
General
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
5 Dec 2006 at 19:39 UTC
Updated:
21 Aug 2018 at 03:30 UTC
Jump to comment: Most recent
Comments
Comment #1
karens commentedThis was done following the instructions in http://drupal.org/node/101009. I committed them as version="$Name$" as the instructions state, and when updated they come back as version = "$Name: $". There is something missing in those instructions and I've posted a comment to that thread so we can figure out what it is.
Comment #2
webchick$Name $ is working correctly... the user has checked out from HEAD which doesn't populate $Name: $ since it's not a branch. If they check out from -r DRUPAL-5, this will change to $Name: DRUPAL-5$
It look rather ugly, but it's still better than being completely blank as it gives you a clue where to start.
Comment #3
Anonymous (not verified) commentedI just posted a reply to KarenS at http://drupal.org/node/101009 in which I asked if $Revision$ shouldn't be used instead of $Name$?
Comment #4
karens commentedAngie, I just tried a checkout from the 5.x branch and got the same results, no name is inserted, it's just $Name: $
Comment #5
webchickOh well that's not right. ;) I'll talk to dww next time I see him and ask him about $Revision$
Comment #6
webchickOk.. so $revision$ is no good because that's the 1.123 part and doesn't actually correspond to the branch name. It also would give you the revision of the _info_ file which is not useful at all. ;) $Name$ is what you want.
However, I wasn't able to duplicate this bug... when I do:
My version shows up as:
which of course is ugly as sin, but at least tells me where to start when I find a bug. :)
Comment #7
Anonymous (not verified) commentedOk, so I'm wondering now if the Drupal core module that parses the .info file shouldn't filter the Version variable to remove the ugliness and set the value to HEAD if it literally matches '$Name: $'? My concern would be that everyone is going to complain to every module/theme maintainer using this method if a filter isn't applied.
Comment #8
webchickThe short answer is no, core shouldn't do that. A couple reasons:
1. End users should NOT be downloading from CVS. They should be using tarballs.
2. Developers may initially be confused by this, but once they understand the concepts of branching it's logical.
3. Adding a "make_nice_version" function in core to parse $Name: $ ties us to CVS for our revision control system from now until whenever 5.x isn't used by anyone anymore (probably years down the road).
However! There is nothing wrong with a small contrib module and/or a code snippet to add this clean-up function. It could probablly simply be a hook_form_alter on the modules form, or even a theme function to override the output on this form.
For now though, I'm going to mark this issue as fixed because it's behaving as it should, and is no fault of CCK.
Comment #9
webchickBtw, here is a snippet you can add to your site which will address this globally: http://drupal.org/node/101009#comment-178021
Comment #10
dwwi fully support everything webchick said in here. ;) also, see http://drupal.org/node/87298 for a bunch more on why core shouldn't parse the value of "version" from the .info files...
cheers,
-derek
Comment #11
karens commentedAlso, just out of curiosity, I checked the latest tarball and it nicely shows the right version.
Comment #12
dwwhttp://drupal.org/node/97286 -- "automatically insert human-readable version into .info files"
i wasn't lying. ;)
cheers,
-derek
Comment #13
karens commentedHey derek, I never doubted you!! I rarely look at the tarball and do everything from cvs, so I just wanted to see what it looked like to others.
Comment #14
dwwhehe, i was just joking. no worries. ;) didn't mean to imply you doubted me, was just pointing to the issue where the goodness happened.
cheers,
-derek
Comment #15
(not verified) commented