A wrapper script for svn
to add some missing features.
Created
September 15, 2011 14:28
-
-
Save abackstrom/1219371 to your computer and use it in GitHub Desktop.
Subversion: Missing Features
This file contains 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
#!/bin/bash | |
SVN_CI_CMD='vim -c "4,\$y" -c "vnew" -c "put" -c "set syntax=diff buftype=nofile nowrap \ | |
nobackup previewwindow bufhidden=delete" -c "silent execute \"%!cut \ | |
-c-5 --complement | xargs svn diff --no-diff-deleted -x --ignore-eol-style\" | \ | |
redraw" -c "wincmd h" +0' | |
SVN=/usr/bin/svn | |
function propdiff { | |
BASE=$(mktemp /tmp/propbase.XXXXXXXXX) | |
CUR=$(mktemp /tmp/propcur.XXXXXXXXX) | |
shift | |
if [ -z "$1" ]; then | |
echo "svn: No property name specified" 1>&2 | |
exit 1 | |
fi | |
"$SVN" propget -rBASE "$@" > "$BASE" | |
"$SVN" propget "$@" > "$CUR" | |
diff -u "$BASE" "$CUR" | |
rm -f -- "$BASE" "$CUR" | |
exit 0 | |
} | |
[ "$1" = "less" ] && shift && exec "$SVN" diff "$@" | less | |
[ "$1" = "ci" ] && SVN_EDITOR=$SVN_CI_CMD exec "$SVN" "$@" | |
[ "$1" = "propdiff" ] && propdiff "$@" | |
exec /usr/bin/svn "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment