Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4478)

Unified Diff: build/mac/tweak_info_plist.py

Issue 11412230: mac: Get revision information from LASTCHANGE like windows and linux do (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/mac/tweak_info_plist.py
diff --git a/build/mac/tweak_info_plist.py b/build/mac/tweak_info_plist.py
index 5c0cf1396b495f7424b6a76758162e6d26ff259a..761352ef735f02a0915ae78faff61a49e458e827 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698