This would allow us to leverage project_dependency for testing of sandbox repositories and non-release branches/tags.

On the down side, it means we would have to manually determine all the useful information that we currently get from a release_node $node object ... and change the unique identifier that the entire module depends on. :(

If not for that second gotcha, something like this would probably simply a refactoring:

/* 
 * Given a label_id, either returns a release node for that label if one exists, 
 * or creates a dummy release object for the label if an associated release node 
 * does not exist.
 */
function project_dependency_getlabelinfo ($label_id) {
  // If $label_id exists in table {versioncontrol_release_labels}
        // Get corresponding $release_nid from {versioncontrol_release_labels}
        // return node_load($release_nid)
  // else
        // Pull from various versioncontrol tables and build a dummy release node 
        // object containing all the fields required by project_dependency, and 
        // return it.
}

Comments

jthorson’s picture

I should clarify ... this would be a 'nice to have' if we were to implement http://drupal.org/node/1123896