From e1accd76606721d3efcdc9b511b74e64c9ac3947 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 15 May 2012 18:44:09 +0000 Subject: [PATCH] [utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156836 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/GetRepositoryPath | 2 +- utils/GetSourceVersion | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/GetRepositoryPath b/utils/GetRepositoryPath index 326231c9e5d..f3b0cc56e25 100755 --- a/utils/GetRepositoryPath +++ b/utils/GetRepositoryPath @@ -16,7 +16,7 @@ fi cd $1 if [ -d .svn ]; then svn info | grep 'URL:' | cut -d: -f2- -elif [ -d .git/svn ]; then +elif [ -f .git/svn/.metadata ]; then git svn info | grep 'URL:' | cut -d: -f2- elif [ -d .git ]; then git remote -v | grep 'fetch' | awk '{ print $2 }' diff --git a/utils/GetSourceVersion b/utils/GetSourceVersion index cbed7daf5b6..b57a6aa2f3a 100755 --- a/utils/GetSourceVersion +++ b/utils/GetSourceVersion @@ -16,7 +16,7 @@ fi cd $1 if [ -d .svn ]; then svnversion | sed -e "s#\([0-9]*\)[A-Z]*#\1#" -elif [ -d .git/svn ]; then +elif [ -f .git/svn/.metadata ]; then git svn info | grep 'Revision:' | cut -d: -f2- elif [ -d .git ]; then git log -1 --pretty=format:%H -- 2.34.1