Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(21)

Issue 7312043: code review 7312043: codereview: add support for linking to Google Code issu...

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by rsc
Modified:
12 years, 11 months ago
Reviewers:
M-A
CC:
codereview-discuss_googlegroups.com
Visibility:
Public.

Description

codereview: add support for linking to Google Code issue tracker If a description includes the line REPO=code.google.com/p/whatever then throughout that description the text 'issue nnn' becomes a link to issue nnn on that Google Code project. The final REPO= line wins, so the one below overrides the one above. Also, the phrase 'CL nnnnn' anywhere turns into a link to that page on the current code review server. For example, this is CL 7312043. Running at rsc-dot-codereview.appspot.com. Fixes issue 422. REPO=code.google.com/p/rietveld

Patch Set 1 #

Patch Set 2 : diff -r 47341173aa45 https://code.google.com/p/rietveld/ #

Patch Set 3 : diff -r 47341173aa45 https://code.google.com/p/rietveld/ #

Patch Set 4 : diff -r 47341173aa45 https://code.google.com/p/rietveld/ #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -1 line) Patch
M codereview/library.py View 1 2 2 chunks +34 lines, -0 lines 1 comment Download
M codereview/models.py View 1 2 3 1 chunk +36 lines, -0 lines 4 comments Download
M templates/issue.html View 1 1 chunk +1 line, -1 line 3 comments Download

Messages

Total messages: 5
rsc
Hello maruel@chromium.org, I'd like you to review this change to https://code.google.com/p/rietveld/
12 years, 11 months ago (2013-02-05 14:28:11 UTC) #1
rsc
See the description at http://rsc-dot-codereview.appspot.com/7312043 for a demo. The idea is that tools that generate ...
12 years, 11 months ago (2013-02-05 14:29:17 UTC) #2
M-A
Sorry for the long delay; was busy breaking other projects. https://codereview.appspot.com/7312043/diff/3004/codereview/library.py File codereview/library.py (right): https://codereview.appspot.com/7312043/diff/3004/codereview/library.py#newcode143 ...
12 years, 11 months ago (2013-02-07 18:17:30 UTC) #3
rsc
Will apply the code fixes in the morning, just wanted to reply to the substantive ...
12 years, 11 months ago (2013-02-08 04:09:38 UTC) #4
M-A
12 years, 11 months ago (2013-02-08 19:52:51 UTC) #5
Added the mailing list, in particular to know if anyone would like to have
support for the format BUG=<project>:<number>.

lgtm

https://codereview.appspot.com/7312043/diff/3004/codereview/models.py
File codereview/models.py (right):

https://codereview.appspot.com/7312043/diff/3004/codereview/models.py#newcode228
codereview/models.py:228: (r'(?i)\b(issue\s+([0-9]+))\b',
On 2013/02/08 04:09:38, rsc wrote:
> I'm happy to add support for BUG= too, but the 'issue NNN' is important to Go
> and I assume to any project using the Google Code issue tracker: it matches
the
> syntax used in CL directives like "Fixes issue nnn." or "Update issue nnn."

Ok I don't mind. I don't know if others would like BUG=, if nobody raises his
hand, no need to implement.
 
> The REPO= line doesn't get transformed because the prefix makes it something
> that Django's urlize will ignore. We could handle it specially I guess.

It's up to you, we don't use this format.

https://codereview.appspot.com/7312043/diff/3004/templates/issue.html
File templates/issue.html (right):

https://codereview.appspot.com/7312043/diff/3004/templates/issue.html#newcode25
templates/issue.html:25:
<pre>{{issue.description|wordwrap:80|urlizetrunc:80|issue_autolink}}</pre>
On 2013/02/08 04:09:38, rsc wrote:
> On 2013/02/07 18:17:30, M-A wrote:
> > I feel you would need to |escape before creating the autolink?
> 
> urlizetrunc does the escaping: it takes text and generates HTML where the text
> is escaped and some things that look like URLs are now links.

Thanks, I was confused.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b