when i moved all the CVS-specific code to cvs_deploy.module (http://drupal.org/node/150316), we lost the ability to ignore HEAD checkouts as dev releases. i see 3 possible solutions:
1) add a CVS-specific special-case directly to update_status.module in update_status_get_projects(), so that if the final version string is "HEAD" we set $type = 'dev'. this is simple, but it re-introduces CVS-specific logic into update_status.module, which i'd really like to avoid.
2) introduce another alter hook, to give other modules a chance to modify the update_status $type variable for each module (to indicate it's really a dev release, etc, etc). i'm proposing "hook_status_type_alter()", and that's what's in the attached patch (which adds the hook invokation to update_status, and the proposed implementation of the hook to cvs_deploy).
3) make it so the existing hook_version_alter() gets to alter both the version string and the $type. i don't like this approach at all, but i figured i'd mention it as a possible alternative to a whole new hook.
unlike a bunch of my other recent changes which i just committed directly without issues, patches, and discussion, this one seems like it requires more consideration, so please comment thoughtfully here.
thanks,
-derek
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | update_status_head_is_dev.patch.txt | 804 bytes | dww |
| #1 | hook_status_type_alter.patch_1.txt | 1.94 KB | dww |
| hook_status_type_alter.patch.txt | 1.94 KB | dww |
Comments
Comment #1
dwwre-roll so the patch applies after some changes i just committed. still for approach #2 from the original post.
Comment #2
dwwalternate (vastly smaller and simpler) patch for approach #1 from the original post. this is lame since it's re-introducing some CVS-specific logic, but perhaps that's the lesser evil.
Comment #3
dwwactually, this might be made completely obsolete by http://drupal.org/node/152387
Comment #4
dwwwell, no, it's possible that even when http://drupal.org/node/152387 is done and working, you might be running a module from HEAD that has no release node pointing to HEAD, in which case we'd still like to ignore it as a dev release. :( so, we're still going to need something from here. however, i think i'm leaning towards #2. conceptually, it's wrong, but it seems like serious overkill to have another whole hook just for this obscure edge case, especially when the resulting change is about 5 characters. ;)
Comment #5
dwwsorry, to clarify, i think i'm leaning towards follow-up/patch #2, which implements approach (1) from the original post...
Comment #6
merlinofchaos commentedI'm ok with a one-line brute force task to deal with the HEAD issues.
Comment #7
dwwCommitted to HEAD. ;)
Comment #8
(not verified) commented