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

Side by Side Diff: recipe_modules/bot_update/resources/bot_update.py

Issue 2021783003: Make WebRTC patches apply to Chromium checkouts on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 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
« 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 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 # TODO(hinoka): Use logging. 6 # TODO(hinoka): Use logging.
7 7
8 import cStringIO 8 import cStringIO
9 import codecs 9 import codecs
10 import collections 10 import collections
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 if patchset: 1120 if patchset:
1121 cmd.extend(['--patchset', patchset]) 1121 cmd.extend(['--patchset', patchset])
1122 if whitelist: 1122 if whitelist:
1123 for item in whitelist: 1123 for item in whitelist:
1124 cmd.extend(['--whitelist', item]) 1124 cmd.extend(['--whitelist', item])
1125 elif blacklist: 1125 elif blacklist:
1126 for item in blacklist: 1126 for item in blacklist:
1127 cmd.extend(['--blacklist', item]) 1127 cmd.extend(['--blacklist', item])
1128 1128
1129 # TODO(kjellander): Remove this hack when http://crbug.com/611808 is fixed. 1129 # TODO(kjellander): Remove this hack when http://crbug.com/611808 is fixed.
1130 if root == 'src/third_party/webrtc': 1130 if root == path.join('src', 'third_party', 'webrtc'):
1131 cmd.extend(['--extra_patchlevel=1']) 1131 cmd.extend(['--extra_patchlevel=1'])
1132 1132
1133 # Only try once, since subsequent failures hide the real failure. 1133 # Only try once, since subsequent failures hide the real failure.
1134 try: 1134 try:
1135 call(*cmd, tries=1) 1135 call(*cmd, tries=1)
1136 except SubprocessFailed as e: 1136 except SubprocessFailed as e:
1137 raise PatchFailed(e.message, e.code, e.output) 1137 raise PatchFailed(e.message, e.code, e.output)
1138 1138
1139 def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset): 1139 def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset):
1140 gerrit_repo = gerrit_repo or 'origin' 1140 gerrit_repo = gerrit_repo or 'origin'
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 except Exception: 1772 except Exception:
1773 # Unexpected failure. 1773 # Unexpected failure.
1774 emit_flag(options.flag_file) 1774 emit_flag(options.flag_file)
1775 raise 1775 raise
1776 else: 1776 else:
1777 emit_flag(options.flag_file) 1777 emit_flag(options.flag_file)
1778 1778
1779 1779
1780 if __name__ == '__main__': 1780 if __name__ == '__main__':
1781 sys.exit(main()) 1781 sys.exit(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