1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-21 18:22:53 +01:00

[utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn

check.

llvm-svn: 156836
This commit is contained in:
Daniel Dunbar 2012-05-15 18:44:09 +00:00
parent 8f241263d7
commit 551d4ff482
2 changed files with 2 additions and 2 deletions

View File

@ -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 }'

View File

@ -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