From 475c26634e98e3e484e586a189cb4d9f8f5bf458 Mon Sep 17 00:00:00 2001 From: "leozwang@webrtc.org" Date: Tue, 10 Jul 2012 20:36:29 +0000 Subject: [PATCH] Re-enable WEBRTC_SVNREVISION script Message: Another try to enable the script to get svn revision number. Most code borrowed from lastchange.py, I simplified and modified to make it work with webrtc. The bottom line of this script is 1. not breake any existing builds 2. get correct svn revision number in a typical engineering setup, so it doesn't deal with some corner cases that lastchange.py does, just simply returns "n/a" since these corner cases will most likely not happen, and it also make this script simple. Description: This script runs "svn info" or "git svn info" to get svn revision number returns "n/a" if both fail. BUG= TEST=try bots Review URL: https://webrtc-codereview.appspot.com/671004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2502 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/build/common.gypi | 11 +------- src/build/version.py | 61 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 10 deletions(-) create mode 100755 src/build/version.py diff --git a/src/build/common.gypi b/src/build/common.gypi index 2ead98cbee..5a550786e1 100644 --- a/src/build/common.gypi +++ b/src/build/common.gypi @@ -99,16 +99,7 @@ '..','../..', # common_types.h, typedefs.h ], 'defines': [ - # TODO(leozwang): Temporally disable it because we cannot assume svn - # is installed by default, it will break Chromium build. The problem - # could happen on Gentoo which download and build tar ball directly, - # it also could happen when developer downloads Chromium tar ball and - # build inside source tree without svn installed. The solution is to - # have a script to deal with these cases and support git-svn. - # Two similar issues have been filed at - # WebRTC http://code.google.com/p/webrtc/issues/detail?id=496 - # Chromium http://code.google.com/p/chromium/issues/detail?id=126452 - 'WEBRTC_SVNREVISION="n/a"', + 'WEBRTC_SVNREVISION="