diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-23 22:53:18 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-23 22:53:18 +0000 |
commit | bbf52444adcf0b8d08f36877e938831e5bd82333 (patch) | |
tree | 8d279c69e8aa5e2c199fd78ee2a3487596219816 | |
parent | c4cc7f2b4490831820cbd8461566e5ddb1154c1d (diff) | |
download | chromium_src-bbf52444adcf0b8d08f36877e938831e5bd82333.zip chromium_src-bbf52444adcf0b8d08f36877e938831e5bd82333.tar.gz chromium_src-bbf52444adcf0b8d08f36877e938831e5bd82333.tar.bz2 |
Make the Mac Info.plist SCM keys generic
This allows the file_version_info_mac code to make sense for any SCM
(e.g., git). It also aligns the use of FetchVersionInfo to its
documented behavior, which is to return a (branch, revision) tuple
for "some appropriate revision control system".
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10828228
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153101 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/file_version_info_mac.mm | 2 | ||||
-rwxr-xr-x | build/mac/tweak_info_plist.py | 22 | ||||
-rw-r--r-- | chrome/chrome.gyp | 12 | ||||
-rw-r--r-- | chrome/chrome_dll.gypi | 4 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 6 | ||||
-rw-r--r-- | content/content_shell.gypi | 8 |
6 files changed, 27 insertions, 27 deletions
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm index 09ae95b..3a6df81 100644 --- a/base/file_version_info_mac.mm +++ b/base/file_version_info_mac.mm @@ -97,7 +97,7 @@ string16 FileVersionInfoMac::special_build() { } string16 FileVersionInfoMac::last_change() { - return GetString16Value(CFSTR("SVNRevision")); + return GetString16Value(CFSTR("SCMRevision")); } bool FileVersionInfoMac::is_official_build() { diff --git a/build/mac/tweak_info_plist.py b/build/mac/tweak_info_plist.py index 07a3a0b..9b57e7d 100755 --- a/build/mac/tweak_info_plist.py +++ b/build/mac/tweak_info_plist.py @@ -101,8 +101,8 @@ def _AddVersionKeys(plist): return True -def _DoSVNKeys(plist, add_keys): - """Adds the SVN information, visible in about:version, to property list. If +def _DoSCMKeys(plist, add_keys): + """Adds the SCM information, visible in about:version, to property list. If |add_keys| is True, it will insert the keys, otherwise it will remove them.""" scm_path, scm_revision = None, None if add_keys: @@ -111,16 +111,16 @@ def _DoSVNKeys(plist, add_keys): scm_path, scm_revision = version_info.url, version_info.revision # See if the operation failed. - _RemoveKeys(plist, 'SVNRevision') + _RemoveKeys(plist, 'SCMRevision') if scm_revision != None: - plist['SVNRevision'] = scm_revision + plist['SCMRevision'] = scm_revision elif add_keys: - print >>sys.stderr, 'Could not determine svn revision. This may be OK.' + print >>sys.stderr, 'Could not determine SCM revision. This may be OK.' if scm_path != None: - plist['SVNPath'] = scm_path + plist['SCMPath'] = scm_path else: - _RemoveKeys(plist, 'SVNPath') + _RemoveKeys(plist, 'SCMPath') def _DoPDFKeys(plist, add_keys): @@ -220,8 +220,8 @@ def Main(argv): help='Enable Breakpad\'s uploading of crash dumps [1 or 0]') parser.add_option('--keystone', dest='use_keystone', action='store', type='int', default=False, help='Enable Keystone [1 or 0]') - parser.add_option('--svn', dest='add_svn_info', action='store', type='int', - default=True, help='Add SVN metadata [1 or 0]') + parser.add_option('--scm', dest='add_scm_info', action='store', type='int', + default=True, help='Add SCM metadata [1 or 0]') parser.add_option('--pdf', dest='add_pdf_support', action='store', type='int', default=False, help='Add PDF file handler support [1 or 0]') parser.add_option('--branding', dest='branding', action='store', @@ -271,8 +271,8 @@ def Main(argv): else: _RemoveKeystoneKeys(plist) - # Adds or removes any SVN keys. - _DoSVNKeys(plist, options.add_svn_info) + # Adds or removes any SCM keys. + _DoSCMKeys(plist, options.add_scm_info) # Adds or removes the PDF file handler entry. _DoPDFKeys(plist, options.add_pdf_support) diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 1d65f4a..0ba725a 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -454,14 +454,14 @@ { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll - # targets. In this case, --breakpad=0, --keystone=0, and --svn=0 - # are used because Breakpad, Keystone, and Subversion keys are + # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 + # are used because Breakpad, Keystone, and SCM keys are # never placed into the helper. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=0', '--keystone=0', - '--svn=0'], + '--scm=0'], }, { # Make sure there isn't any Objective-C in the helper app's @@ -561,14 +561,14 @@ { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll - # targets. In this case, --breakpad=0, --keystone=0, and --svn=0 - # are used because Breakpad, Keystone, and Subversion keys are + # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 + # are used because Breakpad, Keystone, and SCM keys are # never placed into the app mode loader. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=0', '--keystone=0', - '--svn=0'], + '--scm=0'], }, ], }, # target app_mode_app diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index 90e0b86..139b982 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -360,14 +360,14 @@ # The framework needs the Breakpad keys if this feature is # enabled. It does not need the Keystone keys; these always # come from the outer application bundle. The framework - # doesn't currently use the Subversion keys for anything, + # doesn't currently use the SCM keys for anything, # but this seems like a really good place to store them. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=<(mac_breakpad_compiled_in)', '--breakpad_uploads=<(mac_breakpad_uploads)', '--keystone=0', - '--svn=1', + '--scm=1', '--branding=<(branding)'], }, { diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index 39f30b5..9909ed4 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -329,15 +329,15 @@ # Keystone information is included if Keystone is enabled. The # application reads Keystone keys from this plist and not the # framework's, and the ticket will reference this Info.plist to - # determine the tag of the installed product. Use --svn=1 to - # include Subversion information. The --pdf flag controls whether + # determine the tag of the installed product. Use --scm=1 to + # include SCM information. The --pdf flag controls whether # to insert PDF as a supported type identifier that can be # opened. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=0', '--keystone=<(mac_keystone)', - '--svn=1', + '--scm=1', '--pdf=<(internal_pdf)', '--bundle_id=<(mac_bundle_id)'], }, diff --git a/content/content_shell.gypi b/content/content_shell.gypi index d11a963..48340df 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -389,7 +389,7 @@ # Modify the Info.plist as needed. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', - '--svn=1'], + '--scm=1'], }, { # This postbuid step is responsible for creating the following @@ -507,14 +507,14 @@ { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll - # targets. In this case, --breakpad=0, --keystone=0, and --svn=0 - # are used because Breakpad, Keystone, and Subversion keys are + # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 + # are used because Breakpad, Keystone, and SCM keys are # never placed into the helper. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', '--breakpad=0', '--keystone=0', - '--svn=0'], + '--scm=0'], }, { # Make sure there isn't any Objective-C in the helper app's |