Closed
Bug 487330
Opened 16 years ago
Closed 15 years ago
Links in comments pointing to patches should go to the 'diff' view rather than the plain text view, by default
Categories
(Bugzilla :: Attachments & Requests, enhancement)
Bugzilla
Attachments & Requests
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: uokrent, Assigned: uokrent)
Details
Attachments
(1 file, 2 obsolete files)
1.82 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.5) Gecko/2008120908 Red Hat/3.0.5-1.el5_2 Firefox/3.0.5
Build Identifier: bugzilla 3.2.2
It would be cool if the links to attachments (in the comments at least but also in the attachments table) link to the diff view rather than the plain text view if the attachment is a patch (ispatch is true), and the patchviewer is installed. How about it? I've got a patch.
Reproducible: Always
Assignee | ||
Comment 1•16 years ago
|
||
Updated•16 years ago
|
Attachment #371563 -
Flags: review-
Comment 2•16 years ago
|
||
Comment on attachment 371563 [details] [diff] [review]
adds '&action=diff' to attachment links where the attachment is a patch
No, the attachment table already had a "Diff" link to display patches in diff mode.
About comments, this means the behavior would be different for patches than for any other type of attachments. I'm not sure that's what we want (you can already use the [Details] link if you want to). I will have to think about this a bit more.
Assignee | ||
Comment 3•16 years ago
|
||
Yeah, in the attachments table it is kind of redundant.
In the comments though, I think that is what I prefer for patches, and they are already treated differently from other attachments (the ispatch field in the db). I think I personally would prefer to see the diff by default, and hit the [details] link and jump through a hoop or two to see/download the patch itself, rather than easy access to the patch itself and more hoops for the diff. Especially because while I'm reading comments I'm trying to understand what's going on so in that context the side-by-side diff is more useful.
Assignee | ||
Comment 4•16 years ago
|
||
Comment on attachment 371563 [details] [diff] [review]
adds '&action=diff' to attachment links where the attachment is a patch
newer patch obsoletes this one.
Attachment #371563 -
Attachment is obsolete: true
Assignee | ||
Comment 5•16 years ago
|
||
Sorry for the spam, but I didn't like the first patch as you rightly pointed out. I removed the stuff that modifies the attachment table. I also fixed whitespace in the rest of the patch because it wasn't consistent with the surrounding code.
Comment 6•16 years ago
|
||
Comment on attachment 371573 [details] [diff] [review]
links to patch type attaches *in comments* link to diff
You'll have to request review to get this looked at. See our development process here:
http://wiki.mozilla.org/Bugzilla:Developers
Also, you can just my $installed = eval { require PatchReader } since all modules return 1 if they finish properly. Maybe require PatchReader;1 at the worst.
Updated•16 years ago
|
Assignee: attach-and-request → uokrent
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.6
Updated•16 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•16 years ago
|
||
(In reply to comment #6)
> (From update of attachment 371573 [details] [diff] [review])
> You'll have to request review to get this looked at. See our development
> process here:
>
> http://wiki.mozilla.org/Bugzilla:Developers
Cool, will do that.
> Also, you can just my $installed = eval { require PatchReader } since all
> modules return 1 if they finish properly. Maybe require PatchReader;1 at the
> worst.
That's a nifty trick--I didn't know you could do that. But, the way I did it, I lifted that exact chunk from another place in the code (I think it was that same file as a matter of fact, though I don't have it in front of me). Should I still make that change, even if it means being inconsistent with the other spot? I have to admit it is nicer though...
Assignee | ||
Updated•15 years ago
|
Attachment #371573 -
Flags: review?(LpSolit)
Comment 8•15 years ago
|
||
Comment on attachment 371573 [details] [diff] [review]
links to patch type attaches *in comments* link to diff
Works fine. mkanat's suggestion is indeed a good idea. I have updated the patch accordingly, for checkin. r=LpSolit
Attachment #371573 -
Flags: review?(LpSolit) → review+
Comment 9•15 years ago
|
||
I did a slight change compared to the initial patch: we now only look for PatchReader if the attachment is a patch. In a separate bug, we should store this information in Bugzilla->request_cache.
Attachment #371573 -
Attachment is obsolete: true
Attachment #379362 -
Flags: review+
Updated•15 years ago
|
Flags: approval+
Comment 10•15 years ago
|
||
Checking in Bugzilla/Template.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Template.pm,v <-- Template.pm
new revision: 1.100; previous revision: 1.99
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: links to patch type attachments should go to diff rather than text by default if possible → Links in comments pointing to patches should go to the 'diff' view rather than the plain text view, by default
Comment 12•14 years ago
|
||
I guess having a user pref for this behaviour would be out of the question?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334892
Comment 13•14 years ago
|
||
(In reply to comment #12)
> I guess having a user pref for this behaviour would be out of the question?
Yeah, that's not the plan.
You need to log in
before you can comment on or make changes to this bug.
Description
•