Download & Extend

Recover links to VCS web viewers and issue tracker at views

Project:Version Control API
Version:6.x-2.x-dev
Component:Commit Log
Category:bug report
Priority:normal
Assigned:marvil07
Status:closed (fixed)
Issue tags:git phase 2, git sprint 8

Issue Summary

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

#1

tagging

#2

There'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.

#3

Title:Link commit logs views to gitweb?» Links to VCS web viewers
Category:task» bug report

The 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.

#4

Status:active» postponed

Now 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.

#5

Title:Links to VCS web viewers» Links to VCS web viewers at views

This will be postponed also until the conversion of VersioncontrolRepositoryUrlHandler to ctools plugins is done: #354509: Make repository URL backends pluggable

#6

this will probably be affected by #990644: Improve backend interaction with views too :-/

#7

Title:Links to VCS web viewers at views» Recover links to VCS web viewers and bug tracker at views

#8

Issue tags:+git sprint 8

Tagging Git Sprint 8, ought to be resolved when all other repo viewing issues are resolved.

#9

Assigned to:Anonymous» marvil07
Status:postponed» active

I am going to propose something based on #354509-12: Make repository URL backends pluggable.

#10

Status:active» needs work

Ok, 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:

  • Operation revision handler url webviewer integration.
  • Add a views handler for item revision path
  • Independent plugin class for gitweb url handler.
  • url handlers: file and directory view for gitweb
  • Add diff url for gitweb url handler depending on #1024428.
AttachmentSizeStatusTest resultOperations
recover-webviewer-links-on-views-v0.patch11.81 KBTest request sentNoneView details

#11

Removing gitweb stuff from this patch and based on the committed #354509: Make repository URL backends pluggable.

What the patch does:

  • Operation revision handler url webviewer integration.
  • Add a views handler for item revision path
  • Add file and directory view URLs to handlers.
AttachmentSizeStatusTest resultOperations
recover-webviewer-links-on-views-v1.patch6.46 KBTest request sentNoneView details

#12

Title:Recover links to VCS web viewers and bug tracker at views» Recover links to VCS web viewers and issue tracker at views
Status:needs work» needs review

Finally, the issue tracker links working.

This patch:

  • Add a views handler for operation message which handle issue tracker auto-links.
AttachmentSizeStatusTest resultOperations
recover-webviewer-links-on-views-v1-to-v2.patch2.46 KBTest request sentNoneView details
recover-webviewer-links-on-views-v2.patch8.71 KBTest request sentNoneView details

#13

Assigned to:marvil07» chizu

I forgot to handle empty links, here I do it.

AttachmentSizeStatusTest resultOperations
recover-webviewer-links-on-views-v3.patch8.83 KBTest request sentNoneView details
recover-webviewer-links-on-views-v2-to-v3.patch1.91 KBTest request sentNoneView details

#14

Assigned to:chizu» marvil07

upps

#15

Status:needs review» needs work

I'm getting:

Fatal error: Cannot access empty property in versioncontrol/includes/views/handlers/versioncontrol_handler_field_operation_revision.inc on line 3

#16

Status:needs work» needs review

Found a fix by forcing the repo_id as an additional field. Also updated this for the moved views files.

AttachmentSizeStatusTest resultOperations
976148-recover-webviewer-links-on-views-16.patch10.29 KBTest request sentNoneView details

#17

There's also a problem with the issue tracker URL handler, it's not displaying the saved URL setting, updated with:

<?php
'#default_value' => empty($this->options['issue_tracker_url']) ? '' : $this->options['issue_tracker_url'],
?>
AttachmentSizeStatusTest resultOperations
976148-recover-webviewer-links-on-views-17.patch10.37 KBTest request sentNoneView details

#18

Whoops, 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.

AttachmentSizeStatusTest resultOperations
976148-recover-webviewer-links-on-views-18.patch10.17 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 976148-recover-webviewer-links-on-views-18.patch.View details

#19

Status:needs review» fixed

Hate 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.

#20

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.