This is a feature provided by CVSlog currently and seems like a reasonable feature to carry forward and include in our views. We need to figure out if this is something to make highly configurable or what the best way forward for this. My first thoughts are there would be some UI in commitlog or versioncontrol and it could provide a theme function that could be used anytime a hash is that would take the hash, and the project name as parameters and the theme function could pull in the settings and string together a URL.
Comments
Comment #1
mikey_p commentedtagging
Comment #2
sdboyer commentedThere's actually internal support for this within VCAPI, though it's old and needs revisiting. Properly resolving a path for a viewer can be complicated (in the cross-vcs context, anyway), so it's gonna take more than a theme function.
Comment #3
marvil07 commentedThe current configuration lets you map several links per repository, but, as mentioned by sdboyer, it worked on the old commitlog module, so now we just lack of that functionality on the views commitlog.
I think we can stick with that, but also providing a default list of urls per backend, anyway we need to revisit the implementation of VersioncontrolRepositoryUrlHandler class and how it interacts with current API.
Moving to bug as it is a regression.
Comment #4
marvil07 commentedNow that ctools plugins is proposed for #979040: Make pluggable the process of mapping of raw vcs data to Drupal users, I think we should do the same here(a plugin for providing replacements, IMHO as one array from a plugin callback), naturally I would like to wait until the first ctools patch gets in, so marking this as postponed until that happens.
Comment #5
marvil07 commentedThis will be postponed also until the conversion of VersioncontrolRepositoryUrlHandler to ctools plugins is done: #354509: Make repository URL backends pluggable
Comment #6
marvil07 commentedthis will probably be affected by #990644: Improve backend interaction with views too :-/
Comment #7
marvil07 commentedComment #8
eliza411 commentedTagging Git Sprint 8, ought to be resolved when all other repo viewing issues are resolved.
Comment #9
marvil07 commentedI am going to propose something based on #354509-12: Make repository URL backends pluggable.
Comment #10
marvil07 commentedOk, here a patch that implement the links at views handlers, but it still needs work for bug tracker url on commit messages.
Gitweb diff url for the url handler depend on #1024428: Add blob hashes for item revisions.
What the patch does:
Comment #11
marvil07 commentedRemoving gitweb stuff from this patch and based on the committed #354509: Make repository URL backends pluggable.
What the patch does:
Comment #12
marvil07 commentedFinally, the issue tracker links working.
This patch:
Comment #13
marvil07 commentedI forgot to handle empty links, here I do it.
Comment #14
marvil07 commentedupps
Comment #15
mikey_p commentedI'm getting:
Fatal error: Cannot access empty property in versioncontrol/includes/views/handlers/versioncontrol_handler_field_operation_revision.inc on line 3
Comment #16
mikey_p commentedFound a fix by forcing the repo_id as an additional field. Also updated this for the moved views files.
Comment #17
mikey_p commentedThere's also a problem with the issue tracker URL handler, it's not displaying the saved URL setting, updated with:
Comment #18
mikey_p commentedWhoops, realized that the problem in #15 & #16 was due to not clearing the views_cache and picking up the additional_field defined in hook_views_data(). This patch just includes the fix for the options form for the messages field handler and changes to the default views file location.
Comment #19
mikey_p commentedHate to skip review, but this is blocking alot of other issues with fixing up our views, so I'm going to go ahead and commit.