From 8c74d99c63ebdd204199bc8d574dda7cf378a015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 15 Aug 2008 11:00:07 +0000 Subject: [PATCH] * Applied patch by Andreas that uses git as a fallback in case retrieving the revision failed using "svn info". * While there is no official git tree, this should help those people using svn over git. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26977 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/FileRules | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build/jam/FileRules b/build/jam/FileRules index 885f7b6b23..a66887502c 100644 --- a/build/jam/FileRules +++ b/build/jam/FileRules @@ -234,6 +234,10 @@ rule CopySetHaikuRevision target : source local svnEntries = entries ; SEARCH on $(svnEntries) = [ FDirName $(HAIKU_TOP) .svn ] ; Depends $(target) : $(svnEntries) ; + } else if [ Glob [ FDirName $(HAIKU_TOP) .git ] : index ] { + local gitIndex = index ; + SEARCH on $(gitIndex) = [ FDirName $(HAIKU_TOP) .git ] ; + Depends $(target) : $(gitIndex) ; } HAIKU_INCLUDE_IN_IMAGE on $(target) @@ -247,7 +251,12 @@ rule CopySetHaikuRevision target : source actions CopySetHaikuRevision1 { $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) - revision=`(LC_ALL=C LANG=C svn info $(HAIKU_TOP) 2> /dev/null || echo Revision: 0) | + revision=`(LC_ALL=C LANG=C svn info $(HAIKU_TOP) 2> /dev/null || + (cd $(HAIKU_TOP) && LC_ALL=C LANG=C git svn info) 2> /dev/null || + (git log --max-count=1 --grep="git-svn-id:" 2> /dev/null | + grep git-svn-id: | cut -d '@' -f 2 | + awk '{printf "Revision: " $1}') 2> /dev/null || + echo Revision: 0) | grep Revision | awk '{printf $2}'` $(2[1]) --data $(2[3]) $(1) && $(2[2]) $(1) ${revision}