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

Comments

dww’s picture

StatusFileSize
new1.94 KB

re-roll so the patch applies after some changes i just committed. still for approach #2 from the original post.

dww’s picture

StatusFileSize
new804 bytes

alternate (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.

dww’s picture

actually, this might be made completely obsolete by http://drupal.org/node/152387

dww’s picture

well, 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. ;)

dww’s picture

sorry, to clarify, i think i'm leaning towards follow-up/patch #2, which implements approach (1) from the original post...

merlinofchaos’s picture

I'm ok with a one-line brute force task to deal with the HEAD issues.

dww’s picture

Title: add hook_status_type_alter()? » Consider "HEAD" releases dev snapshots.
Status: Needs review » Fixed

Committed to HEAD. ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)