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

Side by Side Diff: slave/skia_slave_scripts/apply_patch.py

Issue 344183004: Use new common utils where possible. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 years, 5 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 6
7 """ Apply a diff to patch a Skia checkout. """ 7 """ Apply a diff to patch a Skia checkout. """
8 8
9 9
10 from ast import literal_eval 10 from ast import literal_eval
11 from build_step import BuildStep, BuildStepFailure 11 from build_step import BuildStep, BuildStepFailure
12 from utils import shell_utils 12 from py.utils import shell_utils
13 from utils.git_utils import GIT 13 from py.utils.git_utils import GIT
14 import os 14 import os
15 import shutil 15 import shutil
16 import sys 16 import sys
17 import tempfile 17 import tempfile
18 import urllib 18 import urllib
19 import urllib2 19 import urllib2
20 20
21 21
22 if os.name == 'nt': 22 if os.name == 'nt':
23 SVN = 'svn.bat' 23 SVN = 'svn.bat'
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 patch_level = (patch_level + 1) % 2 75 patch_level = (patch_level + 1) % 2
76 print 'Trying patch level %d instead...' % patch_level 76 print 'Trying patch level %d instead...' % patch_level
77 shell_utils.run(get_patch_cmd(patch_level, patch_file.name)) 77 shell_utils.run(get_patch_cmd(patch_level, patch_file.name))
78 78
79 finally: 79 finally:
80 shutil.rmtree(temp_dir) 80 shutil.rmtree(temp_dir)
81 81
82 82
83 if '__main__' == __name__: 83 if '__main__' == __name__:
84 sys.exit(BuildStep.RunBuildStep(ApplyPatch)) 84 sys.exit(BuildStep.RunBuildStep(ApplyPatch))
OLDNEW
« no previous file with comments | « slave/skia_slave_scripts/android_verify_device.py ('k') | slave/skia_slave_scripts/build_step.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698