Closed (fixed)
Project:
CVS integration
Version:
4.7.x-1.x-dev
Component:
User interface
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
30 May 2006 at 20:30 UTC
Updated:
4 Jul 2006 at 00:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
dwwwell, we don't need to match the repo for anything, since that's not part of the "CVS directory" path we're looking for. however, we definitely want the 1st part of the path to match the selected project type, and the last part of the path to match the "Project short name". really, the directory should match what's in CVS and the short name should match the directory, but string comparisons are good enough for now to catch the kinds of errors i was talking about in http://drupal.org/node/67941 (duplicate of this). since drupal.org doesn't run on the same filesystem as cvs.drupal.org, there's no good way for the cvs.module to automatically check if the directory really exists.
so, here's a patch to address both of these things. each behavior is controlled by another checkbox in the admin/settings/cvs page (they default to yes). also, projects in the "Projects that can select their CVS repository:" list are excluded from this additional validation (so that the drupal core project with '/' as the cvs directory doesn't have problems).
heavily tested on a local site with all kinds of combinations.
unfortunately, chx tells me there's no way for a single form_set_error() to light-up 2 fields that aren't children of the same parent, so i had to use 2 calls to get both the short name and the cvs directory marked as an error when they don't match.
while i was at it, i fixed a minor pet peave of mine:
it's not "leading" if it's at the end. ;)
anyway, is this RTBC? this will definitely help with the crappy errors that result when all of these things aren't setup just right (i could paste a bunch of issue links in here as examples, but i think we all get the idea).
thanks,
-derek
Comment #2
AjK commentedPatch applied and tested. Does what it says on the tin :)
Only point I would say is that, when the shortname doesn't match the trailing directory name you get two errors :-
I believe there's one error here and not two. But which to highlight? I'd say the directory is wrong and highlight that as the error field. I suppose the description text "This will be used to generate a /project// URL for your project." could be made red to draw attention to the close association of the two textfields ?
Anyway, it does pass the test of doing what Derek intended.
regards
--AjK
Comment #3
dwwyeah, as i said:
yes, it's really 1 error, but either field might be wrong. in fact, more often then not, if they don't match, i'd guess that the short name was the one that'll need changing, while the directory name in cvs will be ok. that's why i decided to just print 2 (symetric) errors.
we probably could clarify the description of the shortname field when cvslog is installed to make it clear it must also match the directory name in cvs. i think that'd be easy in form_alter(), too. i may even roll a new patch for that, but i think it'd be ok to commit this one as-is for now.
Comment #4
AjK commentedAgreed, I'd also sat RTBC
regards
--AjK
Comment #5
gerhard killesreiter commentedlooks good to me.
Comment #6
dwwapplied to HEAD + 4.7.
Comment #7
dwwwhoops, i forgot that the project taxonomy terms on d.o are upper cased.
Comment #8
dwwapplied to head + 4.7
Comment #9
dwwugh, still broken. :( i forgot about "Theme engines" -> "theme-engines".
we considered a more flexible, general purpose UI for mapping taxonomy terms into directory paths, but killes didn't think it was worth the effort. so, this patch isn't the most generic for non drupal.org uses of cvs.module, but it's not completely insane, and it at least stops the bleeding. if someone else wants to use cvs.module somewhere else and finds this too restrictive, they can provide a patch for a more generic solution. ;)
Comment #10
AjK commentedApplied and tested. Patch looks good.
regards
--AjK
Comment #11
dwwin IRC, halkeye also said this was RTBC. applied to 4.7 and HEAD.
Comment #12
(not verified) commented