Skip to content

Instantly share code, notes, and snippets.

@wosc
Created June 21, 2012 06:43
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 wosc/2964267 to your computer and use it in GitHub Desktop.
Save wosc/2964267 to your computer and use it in GitHub Desktop.
#!/bin/bash
ARGS="$@"
case "$1" in
ci)
shift
DIFF=$(svn diff "$@" | grep --context 5 pdb.set_trace)
if [ -n "$DIFF" ]; then
echo "$DIFF"
read -ep "Continue (y/N): " OK
if [ "$OK" != "y" ]; then
exit 0
fi
fi
exec svn $ARGS
;;
add)
shift
if [ -z "$@" ]; then
exec svnaddall
fi
exec svn $ARGS
;;
*)
exec svn $ARGS
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment