Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
If not in single backend mode, versioncontrol_repository_load_multiple()
ignores any backend specific repository controllers and uses VersioncontrolRepositoryController.
As discussed with sdboyer in IRC, we should instead let each backend load the repositories it supports and use VersioncontrolRepositoryController only for those, that have no own controller.
Patch follows.
Comments
Comment #1
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedPlease review.
Edit: Ah, the test request is postponed.
Comment #2
sdboyer CreditAttribution: sdboyer commentedLookin pretty good here, except:
Not quite right here - its' not a question of whether the backends exist (they will), it's a question of whether the backends define their own type of repository controller. So we need to check each backend's value for $backend->classesControllers['repo'] == 'VersioncontrolRepositoryController';
Comment #3
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedRerolled the patch according to your comment.
Comment #4
sdboyer CreditAttribution: sdboyer commentedOnly attach a condition if $non_default_backends is actually non-empty. Otherwise, we see this fun:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT base.repo_id AS repo_id, base.name AS name, base.vcs AS vcs, base.root AS root, base.authorization_method AS authorization_method, base.updated AS updated, base.update_method AS update_method, base.locked AS locked, base.data AS data, base.plugins AS plugins FROM {versioncontrol_repositories} base WHERE (base.repo_id IN (:db_condition_placeholder_0)) AND (base.vcs NOT IN ()) ; Array ( [:db_condition_placeholder_0] => 1 )
Comment #5
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedAs discussed we can get around that by converting NOT IN to IN. All tests passing for me, now :)
Comment #6
sdboyer CreditAttribution: sdboyer commentedYep, passing for me too. Good enough for me, I'm committing this.
Comment #7
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedCool, thanks.