This patch adds the ability to enable the cvslog module but still have projects that have not been associated with a CVS repository to work as they would if the cvslog module were not enabled (ie. releases can be created by manually uploading a file instead of being created when the packaging scripts are run).

The patch removes the upload file UI if a repository is set for the project; otherwise it does NOT remove the upload UI.

Furthermore, the patch fixes what I would consider a hidden bug--cvs_alter_project_release_form_edit() will include the releases current tag in the tag drop down box when editing a release, even if $release->tag is empty. This is problematic for manual upload releases which are not based on a tag, because the release cannot be edited because the CVS tag selection is invalid. The patch includes the current $release->tag only if it is not empty.

If this "feature request" is turned down, I think the part of the patch that alters cvs_alter_project_release_form_edit() should still be applied, since I think that's a genuine bug that just doesn't get exposed because that piece of code normally would not be executed for a release that isn't based on a cvs branch/tag.

AC

Comments

dww’s picture

Category: feature » bug
Status: Active » Needs review

thanks! these are both bugs, and that's definitely a patch. ;) i'll look more closely a little later, but i can't properly review and test this right now...

aclight’s picture

StatusFileSize
new2.62 KB

Ok, I wasn't sure if you'd consider this a bug or not. I also just remembered that projects that do not have a repository set still show the CVS access tab on the top of the project's page if the user is an administrator, etc. This updated patch removes that as well for projects not associated with a repository.

AC

aclight’s picture

See also this issue in the project module:
http://drupal.org/node/151490

that removes the link from the project summary page to "View CVS messages" and "Developers" for projects with no CVS repository set.

aclight’s picture

Title: manual upload releases cannot be edited when cvslog enabled » allow manual upload releases for certain projects when cvslog module is enabled
StatusFileSize
new3.21 KB

Changing title to better reflect what this patch is doing

Another related problem is that if a manual release is created but no file is selected, and then the release is edited, the UI for adding the file isn't displayed, and thus there isn't a way to add a file after initially creating the release. This was first mentioned at http://drupal.org/node/151649

The attached patch now incorporates the fix for this problem as well.

aclight’s picture

StatusFileSize
new3.18 KB

Here is an updated patch that does the same thing but which does so using project_use_versioncontrol() function as discussed in http://drupal.org/node/151892

aclight’s picture

StatusFileSize
new3.16 KB

Here's the same patch but with s/project_use_versioncontrol/project_use_cvs/ run as mentioned in http://drupal.org/node/151892.

AC

dww’s picture

Status: Needs review » Fixed

This patch needed some work. In particular:

A) Comment formatting.

B) Some whitespace badness.

C) This:

+  if (!isset($project->cvs_repository) || $project->cvs_repository == 0) {

Should have been this:

+  if (!project_use_cvs($project)) {

D) This:

+  if (count($tags) > 0) {

Should have been this:

+  if (!empty($tags)) {

However, since I had just committed http://drupal.org/node/151892, I fixed all this myself, tested, and committed to HEAD and DRUPAL-4-7--2.

Thanks!
-Derek

Anonymous’s picture

Status: Fixed » Closed (fixed)