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

Side by Side Diff: bin/cros_mark_chrome_as_stable.py

Issue 6327002: Print out SVN revision number for TOT chrome pfq builds. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix typo Created 9 years, 11 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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS 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 """This module uprevs Chrome for cbuildbot. 7 """This module uprevs Chrome for cbuildbot.
8 8
9 After calling, it prints outs CHROME_VERSION_ATOM=(version atom string). A 9 After calling, it prints outs CHROME_VERSION_ATOM=(version atom string). A
10 caller could then use this atom with emerge to build the newly uprevved version 10 caller could then use this atom with emerge to build the newly uprevved version
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 def _GetTipOfTrunkSvnRevision(): 54 def _GetTipOfTrunkSvnRevision():
55 """Returns the current svn revision for the chrome tree.""" 55 """Returns the current svn revision for the chrome tree."""
56 svn_url = _GetSvnUrl() 56 svn_url = _GetSvnUrl()
57 svn_info = RunCommand(['svn', 'info', svn_url], redirect_stdout=True) 57 svn_info = RunCommand(['svn', 'info', svn_url], redirect_stdout=True)
58 58
59 revision_re = re.compile('^Revision:\s+(\d+).*') 59 revision_re = re.compile('^Revision:\s+(\d+).*')
60 for line in svn_info.splitlines(): 60 for line in svn_info.splitlines():
61 match = revision_re.search(line) 61 match = revision_re.search(line)
62 if match: 62 if match:
63 return match.group(1) 63 svn_revision = match.group(1)
64 Info('Using SVN Revision %s' % svn_revision)
65 return svn_revision
64 66
65 raise Exception('Could not find revision information from %s' % svn_url) 67 raise Exception('Could not find revision information from %s' % svn_url)
66 68
67 69
68 def _GetTipOfTrunkVersion(): 70 def _GetTipOfTrunkVersion():
69 """Returns the current Chrome version.""" 71 """Returns the current Chrome version."""
70 svn_url = _GetSvnUrl() 72 svn_url = _GetSvnUrl()
71 chrome_version_file = urllib.urlopen(os.path.join(svn_url, 'src', 'chrome', 73 chrome_version_file = urllib.urlopen(os.path.join(svn_url, 'src', 'chrome',
72 'VERSION')) 74 'VERSION'))
73 chrome_version_info = chrome_version_file.read() 75 chrome_version_info = chrome_version_file.read()
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 print 'CHROME_VERSION_ATOM=%s' % chrome_version_atom 354 print 'CHROME_VERSION_ATOM=%s' % chrome_version_atom
353 else: 355 else:
354 work_branch.Delete() 356 work_branch.Delete()
355 except: 357 except:
356 work_branch.Delete() 358 work_branch.Delete()
357 raise 359 raise
358 360
359 361
360 if __name__ == '__main__': 362 if __name__ == '__main__':
361 main() 363 main()
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