Bug 52747 - [reviewtool] Add a link for annotated trac page on review page
Summary: [reviewtool] Add a link for annotated trac page on review page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 14:39 PST by Ryosuke Niwa
Modified: 2011-01-20 12:31 PST (History)
6 users (show)

See Also:


Attachments
Patch (7.35 KB, patch)
2011-01-19 16:51 PST, Ojan Vafai
no flags Details | Formatted Diff | Diff
Patch (7.51 KB, patch)
2011-01-20 11:04 PST, Ojan Vafai
abarth: review+
Details | Formatted Diff | Diff
screenshot (105.79 KB, image/png)
2011-01-20 11:06 PST, Ojan Vafai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-01-19 14:39:01 PST
This is a feature request.

I often have to go look up trac logs to see when and why certain code is added.  It'll be really useful if review page had a link to a trac page with annotation with the right line number.
Comment 1 Ojan Vafai 2011-01-19 14:42:29 PST
I wonder if we could also include links for the annotation and revision log. It's a pain to load trac just to click on the link you really want to get to. To avoid clutter, we could only display the links when you mouseover the filename H1 element.
Comment 2 Adam Barth 2011-01-19 14:46:36 PST
Yeah, I bet there's a bunch of cool stuff we could do along these lines.
Comment 3 Ojan Vafai 2011-01-19 16:51:12 PST
Created attachment 79524 [details]
Patch
Comment 4 Adam Barth 2011-01-19 18:41:42 PST
Comment on attachment 79524 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79524&action=review

Screenshot?  :)

> Websites/bugs.webkit.org/code-review.js:346
> +  function tracLinksHtml(file_name, url_hash) {
> +    return '<a href="http://trac.webkit.org/browser/trunk/' + file_name + '?annotate=blame' + url_hash + '" target="_blank">annotate</a>' +
> +        '<a href="http://trac.webkit.org/log/trunk/' + file_name + '" target="_blank">revision log</a>';
> +  }

You haz the XSS.  file_name isn't trusted!  Please use the DOM to construct these links.
Comment 5 Ojan Vafai 2011-01-20 11:04:13 PST
Created attachment 79619 [details]
Patch
Comment 6 Ojan Vafai 2011-01-20 11:06:17 PST
Comment on attachment 79524 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79524&action=review

>> Websites/bugs.webkit.org/code-review.js:346
>> +  }
> 
> You haz the XSS.  file_name isn't trusted!  Please use the DOM to construct these links.

Yikes. Sorry for the n00b.
Comment 7 Ojan Vafai 2011-01-20 11:06:30 PST
Created attachment 79620 [details]
screenshot
Comment 8 Adam Barth 2011-01-20 12:25:57 PST
Comment on attachment 79619 [details]
Patch

Thanks!  Very cool.
Comment 9 Ryosuke Niwa 2011-01-20 12:26:31 PST
Thanks for the feature!
Comment 10 Ojan Vafai 2011-01-20 12:31:02 PST
Committed r76270: <http://trac.webkit.org/changeset/76270>