Last active
April 10, 2018 01:42
-
-
Save alexmurray/6562b7aadb04e101bd1b to your computer and use it in GitHub Desktop.
Improve svn diff to be more like git diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a nicer git-like svn diff which also works for svn externals which | |
# normally svn diff doesn't show | |
function svndiff () { | |
svn status $* | grep '^ *[ADM]' | cut --complement -c -8 | awk '{printf "%s%c", $0, 0}' | xargs -0 svn diff -x -up --depth=files | colordiff | less -R; | |
} | |
function svndiffstat () { | |
svn status $* | grep '^ *[ADM]' | cut --complement -c -8 | awk '{printf "%s%c", $0, 0}' | xargs -0 svn diff -x -up --depth=files | diffstat -C -p0 | |
} | |
# a nicer svn up which works with svn externals | |
function svnup () { | |
svn update --ignore-externals $* | |
svn status | grep 'X ' | cut --complement -c -8 | awk '{printf "%s%c", $0, 0}' | xargs -0 svn up $* | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment