llvm.org GIT mirror llvm / 39dd163
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237516 91177308-0d34-0410-b5e6-96231b3b80d8 Renato Golin 4 years ago
1 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1313
1414 COMMIT=$1
1515 OTHER=$(git svn find-rev "$COMMIT")
16 if [ $? -ne 0 ]; then
16 if [ $? -ne 0 ] || [ "$OTHER" = "" ]; then
1717 echo "Error! Could not find an svn/git revision for commit $COMMIT!"
18 echo
19 echo "Possible problems are:"
20 echo " * Your revision number ($COMMIT) is wrong"
21 echo " * This tree is not up to date (before that commit)"
22 echo " * This commit in in another three (llvm, clang, compiler-rt, etc)"
1823 exit 1
1924 fi
2025