mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
check. llvm-svn: 156836
This commit is contained in:
parent
8f241263d7
commit
551d4ff482
@ -16,7 +16,7 @@ fi
|
|||||||
cd $1
|
cd $1
|
||||||
if [ -d .svn ]; then
|
if [ -d .svn ]; then
|
||||||
svn info | grep 'URL:' | cut -d: -f2-
|
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-
|
git svn info | grep 'URL:' | cut -d: -f2-
|
||||||
elif [ -d .git ]; then
|
elif [ -d .git ]; then
|
||||||
git remote -v | grep 'fetch' | awk '{ print $2 }'
|
git remote -v | grep 'fetch' | awk '{ print $2 }'
|
||||||
|
@ -16,7 +16,7 @@ fi
|
|||||||
cd $1
|
cd $1
|
||||||
if [ -d .svn ]; then
|
if [ -d .svn ]; then
|
||||||
svnversion | sed -e "s#\([0-9]*\)[A-Z]*#\1#"
|
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-
|
git svn info | grep 'Revision:' | cut -d: -f2-
|
||||||
elif [ -d .git ]; then
|
elif [ -d .git ]; then
|
||||||
git log -1 --pretty=format:%H
|
git log -1 --pretty=format:%H
|
||||||
|
Loading…
Reference in New Issue
Block a user