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

Side by Side Diff: build/mac/tweak_info_plist.py

Issue 15897018: Cleanup old TODO in tweak_info_plist.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # 7 #
8 # Xcode supports build variable substitutions and CPP; sadly, that doesn't work 8 # Xcode supports build variable substitutions and CPP; sadly, that doesn't work
9 # because: 9 # because:
10 # 10 #
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return False 122 return False
123 scm_revision = stdout.rstrip() 123 scm_revision = stdout.rstrip()
124 124
125 # See if the operation failed. 125 # See if the operation failed.
126 _RemoveKeys(plist, 'SCMRevision') 126 _RemoveKeys(plist, 'SCMRevision')
127 if scm_revision != None: 127 if scm_revision != None:
128 plist['SCMRevision'] = scm_revision 128 plist['SCMRevision'] = scm_revision
129 elif add_keys: 129 elif add_keys:
130 print >>sys.stderr, 'Could not determine SCM revision. This may be OK.' 130 print >>sys.stderr, 'Could not determine SCM revision. This may be OK.'
131 131
132 # TODO(thakis): Remove this once m25 has reached stable.
133 _RemoveKeys(plist, 'SCMPath')
134 return True 132 return True
135 133
136 134
137 def _DoPDFKeys(plist, add_keys): 135 def _DoPDFKeys(plist, add_keys):
138 """Adds PDF support to the document types list. If add_keys is True, it will 136 """Adds PDF support to the document types list. If add_keys is True, it will
139 add the type information dictionary. If it is False, it will remove it if 137 add the type information dictionary. If it is False, it will remove it if
140 present.""" 138 present."""
141 139
142 PDF_FILE_EXTENSION = 'pdf' 140 PDF_FILE_EXTENSION = 'pdf'
143 141
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 # Info.plist will work perfectly well in any plist format, but traditionally 296 # Info.plist will work perfectly well in any plist format, but traditionally
299 # applications use xml1 for this, so convert it to ensure that it's valid. 297 # applications use xml1 for this, so convert it to ensure that it's valid.
300 proc = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', DEST_INFO_PLIST, 298 proc = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', DEST_INFO_PLIST,
301 temp_info_plist.name]) 299 temp_info_plist.name])
302 proc.wait() 300 proc.wait()
303 return proc.returncode 301 return proc.returncode
304 302
305 303
306 if __name__ == '__main__': 304 if __name__ == '__main__':
307 sys.exit(Main(sys.argv[1:])) 305 sys.exit(Main(sys.argv[1:]))
OLDNEW
« 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