Skip to content

Instantly share code, notes, and snippets.

@troelskn
Created July 3, 2009 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troelskn/140062 to your computer and use it in GitHub Desktop.
Save troelskn/140062 to your computer and use it in GitHub Desktop.
#!/bin/bash
TARGET=$1
SVNROOT=`svn info | grep -h 'Repository Root: .*' | sed 's/Repository Root: //g'`
REVISION=`svn log --limit 1 --quiet $TARGET | grep -oh '^r.*' | sed 's/r\([0-9]*\).*/\1/g'`
svn log --limit 1 $TARGET
svn diff -c $REVISION $SVNROOT | source-highlight --out-format=esc --src-lang=diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment