Closed (won't fix)
Project:
Version Control API
Version:
6.x-2.x-dev
Component:
API module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2009 at 18:31 UTC
Updated:
20 Nov 2010 at 23:05 UTC
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.
Comments
Comment #1
jpetso commentedAny 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.
Comment #2
CorniI commentedI 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.
Comment #3
jpetso commented"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.
Comment #4
marvil07 commentedIMHO it should be fine to call a function that validates it from different places.