Browse Source

[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

Daniel Dunbar 13 years ago
parent
commit
e1accd7660
2 changed files with 2 additions and 2 deletions
  1. 1 1
      utils/GetRepositoryPath
  2. 1 1
      utils/GetSourceVersion

+ 1 - 1
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 }'

+ 1 - 1
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