I created the simplest of little bash functions that I use just about everyday. All it does is:
- Save the output of the SVN diff command of the current directory in a temp file.
- Open that temp file in TextMate, which does beautiful color coding of the diff for easy review before I check in.1
That’s it.
It’s very easy to set up. Edit your .profile file to add the following line:
diffit () { svn diff > ~/Desktop/temp.diff; open -a TextMate ~/Desktop/temp.diff; }
Now open a new terminal window, navigate to an SVN checkout directory that has local changes, and type ‘diffit’ – the command you just defined. You should see the SVN diff results in TextMate, and saved in a temp.diff file on your desktop.
- Now that I think about it, I need to take the time to get Araxis Merge set up to see how it handles .diff files. Also how well its SVN tools work. [back]
This post is part of the thread: Version Control – an ongoing story on this site. View the thread timeline for more context on this post.