wiki:Patches

Version 11 (modified by warner, at 2009-06-21T19:22:28Z) (diff)

.diff for real diffs looks good, aren't downloadable

Please create a new ticket to track the issue unless your patch is a patch for an issue that is already ticketed.

Then run the following darcs commands to generate a darcs patch file named WHAT.txt:

  darcs record
  darcs send -o WHAT.txt

And attach it to the ticket.

Please use a filename like *.txt (instead of *.patch or *.diff) so that Trac will let other developers view it without first requiring them to download it first. (Trac's content-type logic maps *.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.

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