[llvm] r237516 - Improve check on git-svnrevert, better error message
Renato Golin
renato.golin at linaro.org
Sat May 16 03:23:52 PDT 2015
Author: rengolin
Date: Sat May 16 05:23:48 2015
New Revision: 237516
URL: http://llvm.org/viewvc/llvm-project?rev=237516&view=rev
Log:
Improve check on git-svnrevert, better error message
When the commit is not in the tree at all, find-rev returns 0
and prints an empty string. We need to catch that problem too,
when trying to revert.
Adding a list of possible problems, so that you can easily and
quickly correct without having to edit the script again.
Modified:
llvm/trunk/utils/git-svn/git-svnrevert
Modified: llvm/trunk/utils/git-svn/git-svnrevert
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/git-svn/git-svnrevert?rev=237516&r1=237515&r2=237516&view=diff
==============================================================================
--- llvm/trunk/utils/git-svn/git-svnrevert (original)
+++ llvm/trunk/utils/git-svn/git-svnrevert Sat May 16 05:23:48 2015
@@ -14,8 +14,13 @@ fi
COMMIT=$1
OTHER=$(git svn find-rev "$COMMIT")
-if [ $? -ne 0 ]; then
+if [ $? -ne 0 ] || [ "$OTHER" = "" ]; then
echo "Error! Could not find an svn/git revision for commit $COMMIT!"
+ echo
+ echo "Possible problems are:"
+ echo " * Your revision number ($COMMIT) is wrong"
+ echo " * This tree is not up to date (before that commit)"
+ echo " * This commit in in another three (llvm, clang, compiler-rt, etc)"
exit 1
fi
More information about the llvm-commits
mailing list