even once http://drupal.org/node/145095 is committed and fixed, unfortunately, we don't yet have a good way to see if core is a dev release or from CVS (since core doesn't use the $Name$ stuff in their .info files). we're also out of luck if the maintainer didn't include version = "$Name$" at all, or if they try to manually keep the .info file in the contrib repo updated with a human-readable version string.
perhaps we should test for the existance of a "CVS" directory, since the packaging scripts certainly exclude those when making official releases, but the CVS dir is required when you checkout from CVS... that'd handle both core and contrib, and (IMHO) be bullet-proof. if a CVS directory is there, it must be CVS, no matter what the .info file says.
the *only* case this would get wrong is the obscure edge case where someone checks out from CVS, and then installs a real, packaged tarball over the top of that directory tree, putting the official release files into place but leaving the CVS directories there. however, that seems so rare (and stupid) that i don't think it's worth adding code to defend ourselves from that.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | update_status_cvs_type.patch.txt | 5.43 KB | dww |
Comments
Comment #1
merlinofchaos commentedI think a total lack of version info will also tell us it's CVS, and we can use that as a way to look. This is an interesting idea, and it's worth exploring, at least, to see if it can get us the information we need. Isn't it as simple as dirname($file) . '/CVS/Tag'.
Comment #2
dwwyeah, basically. ;) that file won't exist for HEAD checkouts, which is a slight complication, but even that tells us something...
Comment #3
dwwre-arranged the code to convert a CVS tag to a human-readable version string, so it can be shared. this patch is a bullet-proof way to tell if we've deployed from CVS, and it also reads in CVS/Tag if there's no version data in the .info file. quite slick, IMHO. ;) any objections?
Comment #4
dwwcommitted to HEAD.
Comment #5
(not verified) commented