{{at around evening time}} September 6th, 2006 › my new favourite one liner

Well last weeks bug hunt went well by all accounts we managed to convince Ryan to make 30 commits and about 100 tickets were closed. During the process of testing all these patches I found a new favourite one-liner for working with trac and patches:

svn revert -R * && curl "trac-patch-raw-fileurl" | patch -p0

This enables you to download a patch direct from the trac web interface and apply it against your local svn checkout ensuring to revert any other local changes first. For example using this with the patch attached to ticket 3110:

svn revert -R * && curl "http://trac.wordpress.org/attachment/ticket/3110/3110.diff?format=raw" | patch -p0

Read 2 Comments

2 Comments »

I had a good time. Thank you for being a welcoming part of my 1st WordPress bug hunt.

That is a great tip. Looks like the makings of a very useful bash function! Nit: I would probably make the 1st part “svn revert -R .”

Comment by Lloyd D Budd — 7/9/2006 @ 2:16 am §

 

Indeed Lloyd your right I don’t need the * there.

I’ve now added the following to my .bashrc so that I can just copy the patch urls straight from the ticket page and not have to remember to collect the raw file url:


trac-patch() {
svn revert -R . && curl "$1?format=raw" | patch -p0
}

Comment by westi — 13/9/2006 @ 5:52 pm §

 

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

17 queries. 0.442 seconds. Powered by WordPress. This blog is protected by Spam Karma 2: 208312 Spams eaten and counting...