Print tag/branch rather than Download link
| Project: | CVS deploy |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
I'm not 100% sure this is possible, so might be an easy won't fix or postpone.
If I'm using CVS deploy module, then I'm definitely /not/ downloading tarballs from drupal.org, so the download link is rather useless to me. What I /am/ interested in, however, is what tag/branch I need to cvs up -rX to in order to get rid of the warning.
Currently, this involves looking at the recommended version, doing the tag/branch translation in my head (or, alternately, if it's an oddball one like Drupal 6.0-rc3 that I don't know off the top of my head, browsing to cvs.drupal.org to find it), then alt-tabbing into Terminal.app and trying to spell it correctly.
What if instead, CVS deploy removed the download link altogether, and replaced it with the version string like DRUPAL-6-0-RC3 for copy/pasting purposes?

#1
Drat, wish you had suggested this earlier, I might have been able to make it work more cleanly. ;) theme_update_version() is what you'll have to tweak. Something like the attached patch (needs a little cosmetic lovin', but the basic functionality is there). Since this is tweakable at the theme layer, I'm going to have to call this "by design", but there's no way (that I know of) for CVS deploy to inject itself into a core theme function like this. I think you'd just have to define your own version of theme_update_version() in your theme with the copy from core after this patch is applied (more or less). Maybe there's a funky way using the D6 theme template stuff for cvs_deploy to include a sample theme template file for this function with the modified logic, and I could mention it in the README or something. If there's a way to do something like that, by all means, let me know and set this back to active (or CNR with a patch) and I'll commit it.
Thanks/sorry,
-Derek
#2
modules can simply take over any themeing function. see hook_theme_registry_alter. oops - guess that never got written. anyway, is used in a rather global and devilish manner by devel_themer_theme_registry_alter()
#3
also, drush takes care of all this looking up business for you. i highly recommend it. it performs the right cvs operations without you having to think much.
#4
Ok, cool. So, someone can look into writing a cvs_deploy_theme_registry_alter(), hijack theme_update_version(), and make this work without outside effort. /me points approvingly to the "unassigned" value of the Assigned field. ;)
And yeah, "drush pm" is clearly the way to go for cvs_deploy users. I should a) try it out myself, and b) make that more clear in the README.txt and on the project page for cvs_deploy, but that's a separate question.
#5
Ok, Drush added to my list of "must figure this out soon" ;)
I'll see if this itch becomes particularly ravaging enough for me to scratch it over the next couple weeks. It would be nice to learn how to use that hook.
#6
Here's a slight variation of dww's patch in #1 that works better for my needs.
I still like to have the download link in Update Status entries, so I replaced the version string, instead, with the CVS tag.
It still links to the appropriate release notes page, and now lists the version string when moused-over.
#7
Uses hook_theme_registry_alter() to override the theme_update_version() with a modified version of the function implemented within CVS Deploy.
Then does what I did in #6 to list the CVS tag in place of the version string.
Not sure if I've used hook_theme_registry_alter() appropriately. Corrections and suggestions appreciated!
#8
Here's another patch, still using hook_theme_registry_alter(), but back to webchick's original suggestion: to replace the download link (not the version string.)
I wonder if we could make the CVS tag (this injected string) a link to the CVS Instructions page for the module? Need to know the node id for the project page on d.o...
#9
I apply this patch on every site I run...
What does it need to get into CVS Deploy?
Should we have a configuration page, and make this functionality toggle-able?
#10
@jeffschuler: I'm just completely slammed dealing with http://drupal.org/project/issues/search/drupal?issue_tags=Update+manager these days... If it's not a critical bug in one of my modules, I don't have time to care that much about it for the next few weeks until the 11/15 UI freeze of D7 core. ;)
#11
@dww: Understood.