Index: cvs_deploy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cvs_deploy/cvs_deploy.module,v
retrieving revision 1.28
diff -u -p -r1.28 cvs_deploy.module
--- cvs_deploy.module	2 Oct 2010 22:32:16 -0000	1.28
+++ cvs_deploy.module	2 Oct 2010 23:19:22 -0000
@@ -185,3 +185,32 @@ function _cvs_deploy_find_latest_update(
   }
   return $timestamp;
 }
+
+/**
+ * Implements hook_update_status_alter().
+ *
+ * If we're viewing the available updates report, and any of the projects on
+ * the page still think their version is just 'HEAD', but the project has
+ * release data for a release node using 'HEAD' as the tag, we're in the edge
+ * case of viewing the report when there was initially no available update
+ * data. In that case, when hook_system_info_alter() was first invoked, we
+ * didn't have any cached data, and we therefore couldn't convert the version
+ * from HEAD into something else. So, Update status is going to think this
+ * version is not supported, since it doesn't know what version you're
+ * actually running and couldn't find any release information that matched
+ * what you've got. So, if we hit a case like this, redirect to the available
+ * updates report so that there are no bogus results displayed.
+ */
+function cvs_deploy_update_status_alter($projects) {
+  if ($_GET['q'] == 'admin/reports/updates') {
+    foreach ($projects as $key => $project) {
+      if (isset($project['existing_version']) && $project['existing_version'] == 'HEAD' && !empty($project['releases'])) {
+        foreach ($project['releases'] as $version => $release) {
+          if ($release['tag'] == 'HEAD') {
+            return drupal_goto('admin/reports/updates');
+          }
+        }
+      }
+    }
+  }
+}
