summaryrefslogtreecommitdiffstats
path: root/build/mac/tweak_info_plist.py
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 23:04:43 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 23:04:43 +0000
commit38f1c195df8b0ae6375750eb651c0fe117480cf6 (patch)
tree0bc8b848d851e0d94debf19d870f5b3710c499a8 /build/mac/tweak_info_plist.py
parent92b18e981f278ae63657c14b1c8c4d5b710afcbc (diff)
downloadchromium_src-38f1c195df8b0ae6375750eb651c0fe117480cf6.zip
chromium_src-38f1c195df8b0ae6375750eb651c0fe117480cf6.tar.gz
chromium_src-38f1c195df8b0ae6375750eb651c0fe117480cf6.tar.bz2
mac: Get revision information from LASTCHANGE like windows and linux do
BUG=161488 TEST=Check that Chromium.app/Contents/Info.plist still gets the right SCMRevision after syncing and building. Review URL: https://codereview.chromium.org/11412230 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/mac/tweak_info_plist.py')
-rwxr-xr-xbuild/mac/tweak_info_plist.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/build/mac/tweak_info_plist.py b/build/mac/tweak_info_plist.py
index 5c0cf13..761352e 100755
--- a/build/mac/tweak_info_plist.py
+++ b/build/mac/tweak_info_plist.py
@@ -31,9 +31,6 @@ import tempfile
TOP = os.path.join(env['SRCROOT'], '..')
-sys.path.insert(0, os.path.join(TOP, "build/util"))
-import lastchange
-
def _GetOutput(args):
"""Runs a subprocess and waits for termination. Returns (stdout, returncode)
@@ -116,9 +113,14 @@ def _DoSCMKeys(plist, add_keys):
|add_keys| is True, it will insert the keys, otherwise it will remove them."""
scm_revision = None
if add_keys:
- version_info = lastchange.FetchVersionInfo(
- default_lastchange=None, directory=TOP)
- scm_revision = version_info.revision
+ # Pull in the Chrome revision number.
+ VERSION_TOOL = os.path.join(TOP, 'chrome/tools/build/version.py')
+ LASTCHANGE_FILE = os.path.join(TOP, 'build/util/LASTCHANGE')
+ (stdout, retval) = _GetOutput([VERSION_TOOL, '-f', LASTCHANGE_FILE, '-t',
+ '@LASTCHANGE@'])
+ if retval:
+ return False
+ scm_revision = stdout.rstrip()
# See if the operation failed.
_RemoveKeys(plist, 'SCMRevision')
@@ -129,6 +131,7 @@ def _DoSCMKeys(plist, add_keys):
# TODO(thakis): Remove this once m25 has reached stable.
_RemoveKeys(plist, 'SCMPath')
+ return True
def _DoPDFKeys(plist, add_keys):
@@ -282,7 +285,8 @@ def Main(argv):
_RemoveKeystoneKeys(plist)
# Adds or removes any SCM keys.
- _DoSCMKeys(plist, options.add_scm_info)
+ if not _DoSCMKeys(plist, options.add_scm_info):
+ return 3
# Adds or removes the PDF file handler entry.
_DoPDFKeys(plist, options.add_pdf_support)