-# Git or SVN?
-VCS="";
-if svn log >/dev/null 2>&1; then
- VCS="svn";
-elif git diff >/dev/null 2>&1; then
- VCS="git";
- # We need to make sure that we have a tree without any unpushed
- # commits. Otherwise git svn dcommit would commit more than we
- # want.
- if git status | grep -Pq 'Your branch is (?:ahead|behind)'; then
- echo "Your git tree is not clean. Please correct the situation and re-run.";
- echo;
- git status;
- exit 10;
- fi
-fi
-
-if [ -z "$VCS" ]; then
- echo "Unable to determine version control system!";
- exit 1;
-fi
-