Provide a backend-API to check a repository path

CorniI - June 9, 2009 - 18:31
Project:Version Control API
Version:6.x-1.0-rc1
Component:API module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Hey,
it would be nice to have a backend func which checks if a given repository is a git/svn/cvs repo when one adds a new repo/changes it's path.

#1

jpetso - June 9, 2009 - 18:53
Status:active» postponed (maintainer needs more info)

Any reason why you wouldn't want to just insert (form_alter) another validation function into the repository edit form to check it by yourself? Who knows what stuff the backend might want to validate; introducing a custom function for just one of all the possible values will probably just cause more fragmentation and unnecessary complexity imho.

Unless I have missed something important, that is.

#2

CorniI - June 9, 2009 - 19:04

I just thought that it would be nicer to have a backend function which can be called for all operations like fetch now, update/add repo, etc. It felt like duplicating code to form_alter for that.

#3

jpetso - June 9, 2009 - 19:20

"Fetch now" depends on the repository edit form being submitted (and thus validated) correctly. Update and add are the same thing technically. I'm still not convinced that an API function is a good thing here, imho we shouldn't have to check for a repository's validity after it has been successfully added or updated.

 
 

Drupal is a registered trademark of Dries Buytaert.