turns out that xcvs_db_get_drupal_project_nid() gets confused when people add tags to the core repo. the "CVS directory" for the drupal project is just set to "/". this causes havoc for the poor code in xcvs_db_get_drupal_project_nid() trying to match up the given directory handed to it by CVS, and the "CVS directory" values in the DB.

however, there's an easy hack to solve this. the xcvs-config.php file already tells us what repository we're pointing to. so, at the top of xcvs_db_get_drupal_project_nid(), we could just check what's in $xcvs['cvs_repo_id']. if it's a 1, we know it's the core repo, and therefore, the project nid *must* be 3060. if it's a 2, we know it's contrib, and assume that the existing logic (which works if the "CVS directory" isn't just a "/") will continue to find the right nid (which it's been doing flawlessly for a while now).

should be an easy patch, though testing it locally will be a little trickier. ;)

CommentFileSizeAuthor
#1 xcvs-db-core-tags.patch.txt886 bytesdww
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Status: Active » Needs review
FileSize
886 bytes

as advertised, the patch was easy. i managed to get my local test environment setup for this and it all works fine. anyone care to review the hack, or should i just commit/install it? ;)

thanks,
-derek

Kjartan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good for drupal.org usage. Not sure it belongs in the public xcvs scripts or if its something we should maintain separately for drupal.org. However since the xcvs scripts are already have several drupal.org specific things in it one more wont kill anyone, and its probably easier for us for now.

dww’s picture

Status: Reviewed & tested by the community » Fixed

i installed the patch on cvs.d.o, but i didn't commit it to the official version of xcvs-db.php.

after killes gave me the green light, i temporarily added myself so i could make a test tag in core (just on index.php) and successfully saw the tag show up in {cvs_tags} with the right project. i deleted the test tag (and saw the tag removed from {cvs_tags}) and removed myself from having permission to make tags in the core repo.

problem solved,
-derek

Dries’s picture

Looks OK to me. Thanks guys!

Anonymous’s picture

Status: Fixed » Closed (fixed)