Opened 18 years ago
Closed 18 years ago
#4159 closed enhancement (fixed)
Diffs provided within ticket comments should have a download-link
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | wiki system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I would be nice to have an (optional) download-link of diffs which are displayed within tickets, see #4158 for an example.
Attachments (0)
Change History (6)
follow-up: 2 comment:1 by , 18 years ago
comment:2 by , 18 years ago
Replying to Tim Hatch <trac@timhatch.com>:
I'd considered something similar but decided even more useful is to provide an mbox-export for a given ticket — that would contain the text of the diff in a form you could use. This might be a candidate for a plugin?
no idea what this "mbox" is (any pointer?)
I just realized that it would be helpful to be able to save the diff. For other text, a "copy" operation based on a simple "click" may be of benefit.
follow-up: 4 comment:3 by , 18 years ago
mbox format is basically like RFC:822, email, but with an additional specially-formatted line before the headers.
It would include the source of the ticket changes, so you'd be able to see it monospaced in an editor of your choice. As a side note, the date of the original posting is not available anywhere in this screen (just the prettyprinted date)!
A sample for the replies in this ticket (with a fictional diff block at the end, for sake of illustration) would be:
From ilias@lazaridis.com Mon Nov 14 16:15:00 2006 From: ilias@lazaridis.com Subject: Diffs provided within ticket comments should have a download-link I would be nice to have an (optional) download-link of diffs which are displayed within tickets, see #4158 for an example. From trac@timhatch.com Mon Nov 14 16:20:58 2006 From: Tim Hatch <trac@timhatch.com> I'd considered something similar but decided even more useful is to provide an mbox-export for a given ticket -- that would contain the text of the diff in a form you could use. This might be a candidate for a plugin? From ilias@lazaridis.com Mon Nov 14 16:35:55 2006 From: ilias@lazaridis.com Replying to [comment:1]: > I'd considered something similar but decided even more useful is to provide an mbox-export for a given ticket -- that would contain the text of the diff in a form you could use. This might be a candidate for a plugin? no idea what this "mbox" is (any pointer?) I just realized that it would be helpful to be able to save the diff. For other text, a "copy" operation based on a simple "click" may be of benefit. {{{ #!diff Index: htdocs/css/trac.css =================================================================== --- htdocs/css/trac.css (revision 2873) +++ htdocs/css/trac.css (working copy) @@ -42,6 +42,19 @@ color: inherit; } +/* Heading anchors */ +.anchor:link, .anchor:visited { + border: none; + color: #d7d7d7; + font-size: .8em; + vertical-align: text-top; + visibility: hidden; +} +h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, +h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { + visibility: visible; +} + @media screen { a.ext-link .icon { background: url(../extlink.gif) left center no-repeat; }}}
comment:4 by , 18 years ago
Replying to Tim Hatch <trac@timhatch.com>:
mbox format is basically like RFC:822, email, but with an additional specially-formatted line before the headers.
I've understood, but this would be out of the scope of this ticket.
You should possibly open one subjecting the ticket-notifications of trac (e.g. changing format to "mbox" and allowing manual "send" operation).
comment:5 by , 18 years ago
Milestone: | → 0.11 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I was sure there was already a ticket about this, but can't find it… so maybe I was wrong. The basic problem being that the pretty-printed diff doesn't allow you to copy-paste/save the diff and apply it.
Anyway, I've got some javascript code that lets you switch between tabular and unified view of a diff, both for patches embedded in wiki text, as attachments, and the changeset view. It's pretty nice IMHO, so I'll check it in.
comment:6 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Checked in in [4282]. As I think it addresses the intent of this ticket, I'm closing this.
I'd considered something similar but decided even more useful is to provide an mbox-export for a given ticket — that would contain the text of the diff in a form you could use. This might be a candidate for a plugin?