Closed (fixed)
Project:
CVS deploy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Jun 2007 at 18:49 UTC
Updated:
4 Jul 2007 at 20:47 UTC
Jump to comment: Most recent file
now that http://drupal.org/node/152282 is done, the .xml release history files on d.o have a <tag> attribute that says what CVS tag they came from. we can use this to provide better version strings for stuff checked out from HEAD, since we can search the history for the release node pointing to HEAD and use the human-readable version string it's got, instead of just printing "HEAD" like we do now.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | cvs_deploy_resolve_HEAD.patch_1.txt | 11.22 KB | dww |
| #1 | cvs_deploy_resolve_HEAD.patch.txt | 1.62 KB | dww |
Comments
Comment #1
dww(depends on changes I *just* committed to update_status.module for this to work: http://drupal.org/cvs?commit=70620).
Comment #2
dwwwhoops, something about this patch screws up the modules page and it goes into an infinite loop. ;) i didn't notice this in testing on my flight home, since i was offline and never trying to aquire release data. will have to look into this more closely once i've had some sleep...
Comment #3
dwwHere's the deal:
There are a few ways to break this chain:
Also, there's a problem with this patch that it's looking in the $avail array for each module on the admin/build/modules page, but that array is only per-project. Unfortunately, the data about grouping modules into projects lives in the $projects array returned by update_status_get_projects(), and that info isn't stored/cached inside $avail. :( So, we should really be calling that from cvs_deploy_alter_version(), too (and caching the results in RAM, at least), so we can find the version based on the project for modules that are contained inside another module's project (e.g. project_release.module vs. project.module). That'd be a strong argument in favor of option (1) above. OR we could stash this project/module info in the $avail array, so we could get to this data without re-doing all the work of update_status_get_projects(), in which case (2) might not be so bad.
Maybe we need a little bit more of a reorganization of update_status_get_projects() and update_status_refresh(), perhaps moving some of the code that's specific to update_status_calculate_project_data() out of update_status_get_projects(). I'm not yet clear what's the best way to go with all of this...
Comment #4
dwwthis turned into quite a complication, but the resulting refactoring should make things mostly easier to read and maintain, anyway. there's still some lingering badness regarding projects that define multiple modules... we cut a few corners here and there, though still works. the basic idea here is to break up the formerly-monolithic update_status_get_projects() into some smaller pieces:
Make sense? Therefore, here's the basic logic and call tree in the 3 important cases:
Sorry this reply is so long, but I wanted to record the motivation, since it's a huge patch. Again, probably clearer to just apply the patch and look at the above functions yourself, then trying to understand what changed only via inspecting the diff.
One lingering gotcha in the UI: since we're only fetch data for installed projects, we can only resolve HEAD for installed modules (or at least modules from projects that have at least 1 module installed).
Comment #5
dwwActually, this patch is overwhelmingly about reorganizing the code inside update_status, so i'm moving it over to that queue for now.
Comment #6
dwwAfter brief discussion with merlin on IRC, committed this to HEAD for both modules.
Moving this back to the cvs_deploy issue queue for posterity. ;)
Comment #7
(not verified) commented