Posted by jpetso on January 5, 2009 at 12:12pm
| Project: | Version Control API |
| Version: | 6.x-2.x-dev |
| Component: | API module |
| Category: | feature request |
| Priority: | major |
| Assigned: | marvil07 |
| Status: | closed (fixed) |
| Issue tags: | git phase 2, git sprint 8 |
Issue Summary
Repository URL backends provide the URLs for various repository related links. For example, one could select a WebSVN URL backend, enter the WebSVN root, and get all the URLs for free without having to enter them manually. Various URL backends might also provide URLs that can't be created using the default URL backend's simple string replacement mechanism.
At least, that's the theory, because the default URL backend ('versioncontrol_default_urls') is currently hardcoded. We might want to make URL backends actually pluggable sometime, although it doesn't seem like a big priority right now.
Comments
#1
After analysing it and talking with @jpetso, we found that pluggable url backends do not have enough reasons to be.
So at oop branch the idea of url backends dissappear.
In the other side, the functionality mentioned here is a helper, and it can be done with form alter, so it would be handy to have at least one as a reference implementation.
#2
#3
related to #156118: Automatically generate the value of 'Link to webcvs/viewcvs' field for a project
#4
Marking this as postponed, since IMHO this will be happening as part of converting VersioncontrolRepositoryUrlHandler into several ctools plugins \o/ #976148: Recover links to VCS web viewers and issue tracker at views
#5
Ok, I am moving the title back to the original, since the idea of making them pluggable come up again.
The main difference will be the approach, as mentioned in #4, but postponing this until the first ctools patch gets in: probably #979040: Make pluggable the process of mapping of raw vcs data to Drupal users
#6
reopening, since #979040: Make pluggable the process of mapping of raw vcs data to Drupal users is committed
#7
have an uncompleted patch, going to post it here soon.
#8
untagging as decided today on meeting
#9
Tagging for Git Sprint 8
Connects to the repo viewer ... #939024: Decide if we should switch to a homemade git viewer instead of cgit or gitweb
#10
Here is a patch with the general idea, it still needs some work, but uploading it since I will not be working on it for a day.
#11
Sorry my review of this got delayed.
VersioncontrolRepository::$pluginInstancesproperty that should probably be where the instantiated viewer object gets stored, for consistency with the way other plugins operate.VersioncontrolRepositoryUrlHandlerinto its own inc file somewhere in a way more consistent with how other comparable classes are handled.So apart from wanting to decouple the commitlog from the repo browser in this plugin, looks like we're pretty well on the same page. Let's see some more patches :)
#12
Ok, I think this is ready.
What is new in this patch:
It is going to be re-added as a views handler option for operation
messages.
#13
I'll try to get to this a little later tonight, very focused on the beanstalkd stuff atm.
#14
I noticed some mistakes while implementing integration on views handlers, so here the fixes.
#15
+ if (!class_exists($class_name)) {+ throw new Exception("Plugin 'webviewer_url_handler' of type 'webviewer_url_handlers' does not contain a valid class name in handler slot 'handler'", E_WARNING);
+ return FALSE;
+ }
There's static text that should be variable in those error messages.
+ unset($data['versioncontrol']['url_handler']);+ $data['versioncontrol']['base_url'] = '';
+ $data = serialize($row->data);
I don't like the namespacing within the $data array, never did (sign of bad architecture, IMO). Let's not introduce any more of it.
The gitweb inc is still in there, and...
@@ -149,9 +149,14 @@ abstract class VersioncontrolTestCase extends DrupalWebTestCase {'auth_handler' => 'ffa',
'author_mapper' => 'simple_mail',
'committer_mapper' => 'simple_mail',
+ //FIXME use a general commitlog url handler
+ 'webviewer_url_handler' => 'gitweb',
);
...still referenced in the views handler.
I must admit, I'd never quite thought to do what you've done with the 'none' plugin for this - use variables statically declared as part of the plugin as args to the plugin's class. Kinda awkward, but OK for us to start with, anyway.
Apart from that stuff, looking pretty good. Fix it up and I think we're RTBC, though we'll need a follow-up issue to do the gitweb plugin in vc_git.
#16
Ok, here the changes mentioned on #15.
#17
OK great. Go ahead and commit.
#18
#19
I changed some things before committing:
#20
Ok, it's in!
#21
Automatically closed -- issue fixed for 2 weeks with no activity.