[llvm-commits] [llvm] r156836 - in /llvm/trunk/utils: GetRepositoryPath GetSourceVersion

Daniel Dunbar daniel at zuster.org
Tue May 15 11:44:09 PDT 2012


Author: ddunbar
Date: Tue May 15 13:44:09 2012
New Revision: 156836

URL: http://llvm.org/viewvc/llvm-project?rev=156836&view=rev
Log:
[utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
check.

Modified:
    llvm/trunk/utils/GetRepositoryPath
    llvm/trunk/utils/GetSourceVersion

Modified: llvm/trunk/utils/GetRepositoryPath
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/GetRepositoryPath?rev=156836&r1=156835&r2=156836&view=diff
==============================================================================
--- llvm/trunk/utils/GetRepositoryPath (original)
+++ llvm/trunk/utils/GetRepositoryPath Tue May 15 13:44:09 2012
@@ -16,7 +16,7 @@
 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 }'

Modified: llvm/trunk/utils/GetSourceVersion
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/GetSourceVersion?rev=156836&r1=156835&r2=156836&view=diff
==============================================================================
--- llvm/trunk/utils/GetSourceVersion (original)
+++ llvm/trunk/utils/GetSourceVersion Tue May 15 13:44:09 2012
@@ -16,7 +16,7 @@
 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





More information about the llvm-commits mailing list