Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#4159 closed enhancement (fixed)

Diffs provided within ticket comments should have a download-link

Reported by: ilias@… 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)

comment:1 by Tim Hatch <trac@…>, 15 years ago

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?

in reply to:  1 comment:2 by ilias@…, 15 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.

comment:3 by Tim Hatch <trac@…>, 15 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;
}}}

in reply to:  3 comment:4 by ilias@…, 15 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 Christopher Lenz, 15 years ago

Milestone: 0.11
Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

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 Christopher Lenz, 15 years ago

Resolution: fixed
Status: assignedclosed

Checked in in [4282]. As I think it addresses the intent of this ticket, I'm closing this.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.