X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fgit-svn%2Fgit-svnrevert;h=06a9c440915f1e26261def374fd48e8b4c0daba7;hb=03fddb710e1db886dc158fd6ac6decf8201fe4aa;hp=de4ff1cd4663a85fc96134a0d0b113cd2168016c;hpb=19c37352626531efe1a8128a168804a4bb5adc86;p=oota-llvm.git diff --git a/utils/git-svn/git-svnrevert b/utils/git-svn/git-svnrevert index de4ff1cd466..06a9c440915 100755 --- a/utils/git-svn/git-svnrevert +++ b/utils/git-svn/git-svnrevert @@ -14,10 +14,9 @@ fi COMMIT=$1 -SVN_REVISION=$(git log -1 $COMMIT | grep git-svn-id | tr -s "@" " " | cut -f 4 -d " ") - -if [ -z "$SVN_REVISION" ]; then - echo "Error! Given commit is not a git-svn revision!" +SVN_REVISION=$(git svn find-rev "$COMMIT") +if [ $? -ne 0 ]; then + echo "Error! Could not find an svn revision for commit $COMMIT!" exit 1 fi