Edgewall Software
Modify

Ticket #4159 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Diffs provided within ticket comments should have a download-link

Reported by: ilias@… Owned by: cmlenz
Priority: normal Milestone: 0.11
Component: wiki system Version: devel
Severity: normal Keywords:
Cc:
Release Notes:
API 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

Change History

comment:1 follow-up: Changed 5 years ago by Tim Hatch <trac@…>

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?

comment:2 in reply to: ↑ 1 Changed 5 years ago by ilias@…

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 follow-up: Changed 5 years ago by Tim Hatch <trac@…>

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 in reply to: ↑ 3 Changed 5 years ago by ilias@…

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 Changed 5 years ago by cmlenz

  • Milestone set to 0.11
  • Owner changed from jonas to cmlenz
  • Status changed from new to 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 Changed 5 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from assigned to closed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.