Permalink
Browse files

cherry pick 646c49f9a35cf1f760519b358405d53bc701aea2

switch from svn to git for versions
  • Loading branch information...
1 parent e4acf11 commit e58b262d02127e81cd83bcb759b32f77dd2dbe6f @amet amet committed with davilla Jan 6, 2011
Showing with 18 additions and 26 deletions.
  1. +1 −1 .gitignore
  2. +2 −2 XBMC.xcodeproj/project.pbxproj
  3. +7 −15 configure.in
  4. +4 −4 guilib/system.h
  5. +2 −2 xbmc/Application.cpp
  6. +2 −2 xbmc/utils/GUIInfoManager.cpp
View
@@ -71,7 +71,7 @@ config.log
/stamp-h1
/xbmc.bin
/xbmc-xrandr
-/svn_revision.h
+/git_revision.h
# /addons/
/addons/com.nullsoft.milkdrop.xbmc/*.vis
@@ -7186,7 +7186,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Update version in Info.plist with SVN revision\nSVN_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nSVN_REVISION=\"SVN-\"$(cat svn_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$SVN_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
+ shellScript = "# Update version in Info.plist with Git revision\nGIT_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nGIT_REVISION=\"Git-\"$(cat git_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$GIT_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
};
F5A1CBDE0F6B0B4700A96ABD /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
@@ -7229,7 +7229,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Update version in Info.plist with SVN revision\nSVN_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nSVN_REVISION=\"SVN-\"$(cat svn_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$SVN_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
+ shellScript = "# Update version in Info.plist with Git revision\nGIT_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nGIT_REVISION=\"Git-\"$(cat git_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$GIT_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
};
F5DEC3580E6DEBB2005A4E24 /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
View
@@ -1118,7 +1118,6 @@ if test "$ARCH" != "x86_64-linux"; then
fi
fi
-AC_CHECK_PROG(HAVE_SVNVERSION,svnversion,"yes","no",)
AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
# Checks for header files.
@@ -1296,23 +1295,16 @@ else
final_message="$final_message\n Avahi:\tNo"
fi
-if ! test -n "$SVN_REV" -a "$SVN_REV" != "" ; then
- if test "$HAVE_SVNVERSION" = "yes" ; then
- SVN_REV=$(svnversion -n -c 2>/dev/null | grep -iv ^exported | sed -e 's/.*\://')
- fi
- if test "$SVN_REV" = ""; then
- if test "$HAVE_GIT" = "yes"; then
- SVN_REV=$(./gitrev.sh)
- fi
- fi
- if test "$SVN_REV" = ""; then
- SVN_REV="Unknown"
- fi
+if test "$HAVE_GIT" = "yes"; then
+ GIT_REV=$(git rev-parse --short HEAD)
+fi
+if test "$GIT_REV" = ""; then
+ GIT_REV="Unknown"
fi
if test "$host_vendor" = "apple"; then
- echo "#define SVN_REV \"$SVN_REV\"" > svn_revision.h
+ echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
else
- SDL_DEFINES="$SDL_DEFINES -D'SVN_REV=\"$SVN_REV\"'"
+ SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
fi
if test "$use_nonfree" = "yes"; then
View
@@ -152,15 +152,15 @@
#endif
/*****************
- * SVN revision
+ * Git revision
*****************/
#ifdef __APPLE__
- #include "../svn_revision.h"
+#include "../git_revision.h"
#endif
-#ifndef SVN_REV
- #define SVN_REV "Unknown"
+#ifndef GIT_REV
+#define GIT_REV "Unknown"
#endif
/****************************************
View
@@ -503,9 +503,9 @@ bool CApplication::Create()
CLog::Log(LOGNOTICE, "-----------------------------------------------------------------------");
#if defined(__APPLE__)
- CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Mac OS X (%s). Built on %s (SVN:%s)", g_sysinfo.GetUnameVersion().c_str(), __DATE__, SVN_REV);
+ CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Mac OS X (%s). Built on %s (Git:%s)", g_sysinfo.GetUnameVersion().c_str(), __DATE__, GIT_REV);
#elif defined(_LINUX)
- CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Linux (%s, %s). Built on %s (SVN:%s)", g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str(), __DATE__, SVN_REV);
+ CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Linux (%s, %s). Built on %s (Git:%s)", g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str(), __DATE__, GIT_REV);
#elif defined(_WIN32)
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: %s. Built on %s (SVN:%s, compiler %i)",g_sysinfo.GetKernelVersion().c_str(), __DATE__, SVN_REV, _MSC_VER);
CLog::Log(LOGNOTICE, g_cpuInfo.getCPUModel().c_str());
@@ -3438,8 +3438,8 @@ CTemperature CGUIInfoManager::GetGPUTemperature()
CStdString CGUIInfoManager::GetVersion()
{
CStdString tmp;
-#ifdef SVN_REV
- tmp.Format("%s r%s", VERSION_STRING, SVN_REV);
+#ifdef GIT_REV
+ tmp.Format("%s Git:%s", VERSION_STRING, GIT_REV);
#else
tmp.Format("%s", VERSION_STRING);
#endif

0 comments on commit e58b262

Please sign in to comment.