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

Side by Side Diff: dartium_tools/fetch_reference_build.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/export_overrides.py ('k') | dartium_tools/generate_dart_vm_version.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 (c) 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """Fetches an archived chromium build into
8 src/chrome/tools/test/reference_build unless
9 src/chrome/tools/test/reference_build/REQUESTED_REVISION is the same as
10 src/chrome/tools/test/reference_build/CURRENT_REVISION.
11 Must be run from the root of a Dartium or multivm checkout.
12
13 Usage:
14 $ ./src/dartium_tools/fetch_reference_build_revision.py
15 """
16
17 import os
18 import subprocess
19 import sys
20
21 def main(argv):
22 dirname = os.path.join('src', 'chrome', 'tools',
23 'test', 'reference_build')
24 request = os.path.join(dirname, 'REQUESTED_REVISION')
25 found = os.path.join(dirname, 'CURRENT_REVISION')
26 if not os.path.exists(request):
27 return
28 with file(request, 'r') as f:
29 request_revision = f.read()
30
31 if os.path.exists(found):
32 with file(found, 'r') as f:
33 found_revision = f.read()
34 if found_revision == request_revision:
35 return
36
37 get_script = os.path.join('src', 'dartium_tools', 'get_chromium_build.py')
38 get_script = os.path.abspath(get_script)
39 exit_code = subprocess.call(['python', get_script,
40 '-r', request_revision,
41 '-t', dirname])
42 if exit_code == 0:
43 with file(found, 'w') as f:
44 f.write(request_revision)
45 return exit_code
46
47 if __name__ == '__main__':
48 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « dartium_tools/export_overrides.py ('k') | dartium_tools/generate_dart_vm_version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698