yay we have in-line viewing with rudimentary syntax highlighting for *.dpatch

[Imported from Trac: page Patches, version 14]
zooko 2010-05-19 04:14:33 +00:00
parent 2a6041b3e9
commit c48d95b506

@ -6,24 +6,12 @@ Then run the following darcs commands to generate a darcs patch file named `WHAT
``` ```
darcs record darcs record
darcs send -o WHAT.darcspatch.txt darcs send -o WHAT.dpatch
``` ```
And attach it to the ticket. And attach it to the ticket.
Please use a filename like *.txt (instead of *.patch or *.diff) so that Trac will let other Please use a filename like *.dpatch (instead of *.patch or *.diff) so that Trac will display it
developers view it without first requiring them to download it first. (Trac's content-type logic maps with syntax highlighting instead of requiring people to download it to see it.
*.patch and *.diff to some application/blahblah MIME type, which it refuses to display as HTML)
If you don't have darcs or don't want to use it, just attach a normal old diff. If you don't have darcs just attach a normal old unified diff.
## discussion
If you have an actual diff (as opposed to a darcs patch created with 'darcs send'), then .diff is
good, because Trac knows how to render them. At least it does on the attachements I looked at
on #684 . I haven't checked to see what a darcs patch file attached with a .diff filename looks like,
I think it could get pretty ugly.
On the other hand, downloading the diff with "Download Original Format" gets a content-type which firefox
insists upon saving instead of displaying. I think I'm ok with that.. what I care about is being able to
review the change easily, and Trac's diff markup is pretty good.
-warner