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

Side by Side Diff: dartium_tools/update_version.py

Issue 239993009: Revert accidental dartium code push (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « dartium_tools/update_patched_files.py ('k') | dartium_tools/utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2012 Google Inc. All Rights Reserved.
4
5 import subprocess
6 import sys
7
8 def FetchSVNRevision():
9 try:
10 proc = subprocess.Popen(['svn', 'info'],
11 stdout=subprocess.PIPE,
12 stderr=subprocess.PIPE,
13 cwd='src/dart',
14 shell=(sys.platform=='win32'))
15 except OSError:
16 # command is apparently either not installed or not executable.
17 return None
18 if not proc:
19 return None
20
21 for line in proc.stdout:
22 line = line.strip()
23 if not line:
24 continue
25 key, val = line.split(': ', 1)
26 if key == 'Revision':
27 return val
28
29 return None
30
31
32 def main():
33 revision = FetchSVNRevision()
34 path = 'src/chrome/VERSION'
35 text = file(path).readlines()
36 text[2] = 'BUILD=d%s\n' % revision
37 file(path, 'w').writelines(text)
38
39 if __name__ == '__main__':
40 main()
OLDNEW
« no previous file with comments | « dartium_tools/update_patched_files.py ('k') | dartium_tools/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698