I'm Marnanel, and this is my blog. Well, sort of. It isn't timely like a blog, and I don't expect you to subscribe to the feed (though I won't complain if you do). Rather, treat it as a quick trot around my mind, a chat over a pint in the pub, assuming you'd be caught dead talking about software in the pub. You should start here.

Friday, May 25, 2007

Tips: How to get function names in svn diff

There used to be a -p switch to cvs diff which would print the names of functions which had changed between your working copy and the repository. svn doesn't have the switch (why on earth not?) but you can make it spawn an external diff process and do -p that way thus:

alias svndiff="svn diff --diff-cmd diff --extensions \"-u -p\""

Put that in your .bashrc so that you can type svndiff wherever you go. Note that we use -u for unified diffs, because anything else is evil.

h/t: the KDE people.

1 comments:

Trochee said...

this is neat. I didn't even know about the `cvs diff` options. handy to be able to invoke cvs diff with all the diff options (e.g. -p).