I'm a little on the lazy side, so when checking out a patch the process of going to the ticket, clicking on the link to a patch, scrolling doing to the bottom to download the raw patch, locating and applying the patch was just getting way too much effort (is there a better way?)
So I wrote something to do it for me. Now I can do
Fs-Macbook:~/rails_trunk fred$ apply_ticket 9640
and it will find the patch(es) for that ticket, ask me which one I want to apply if there are more than one and download & apply it for me
Anyway, if it's useful for anyone else I'd love to hear about it.
I did the same, but my solution is more featured - you can redirect stdin to Trac and have, say, svn di uploaded as a patch to certain ticket. It can also post tickets/comments to Trac. I wanted to share it, but court3nay, who helped me in the first place, said it allows for easy Trac spamming so it’s maybe not a very good idea.
Forgot that I wanted to say this:
+1 for maintaining this. It’s very useful for anyone, especially core members and patch reviewers.
That was my intent. It was just getting in my way when I wanted to check out a patch. I can see how automated uploads of patches could be a bad thing (If anything uploading a patch requiring a few extra clicks just gives you a few extra 'do I really want to do this' moments. A pure read operation can only gain from being easy.
When I get home today, I will send you the code I’m using for uploading. Usage example:
svn di | ticket 1234 name-of-patch
The script outputs the URL for patch preview on Trac. I’m sure you’ll find it useful.