OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from recipe_engine import recipe_api | 5 from recipe_engine import recipe_api |
6 | 6 |
7 | 7 |
8 class RevisionResolver(object): | 8 class RevisionResolver(object): |
9 """Resolves the revision based on build properties.""" | 9 """Resolves the revision based on build properties.""" |
10 | 10 |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 368 |
369 def set_patch_project_revision(self, patch_project, gclient_config=None): | 369 def set_patch_project_revision(self, patch_project, gclient_config=None): |
370 """Updates config revision corresponding to patch_project. | 370 """Updates config revision corresponding to patch_project. |
371 | 371 |
372 Useful for bot_update only, as this is the only consumer of gclient's config | 372 Useful for bot_update only, as this is the only consumer of gclient's config |
373 revision map. This doesn't overwrite the revision if it was already set. | 373 revision map. This doesn't overwrite the revision if it was already set. |
374 """ | 374 """ |
375 assert patch_project is None or isinstance(patch_project, basestring) | 375 assert patch_project is None or isinstance(patch_project, basestring) |
376 cfg = gclient_config or self.c | 376 cfg = gclient_config or self.c |
377 path, revision = cfg.patch_projects.get(patch_project, (None, None)) | 377 path, revision = cfg.patch_projects.get(patch_project, (None, None)) |
| 378 |
| 379 # TODO(kjellander): Remove this hack when http://crbug.com/611808 is fixed. |
| 380 if patch_project == 'webrtc' and path == 'src/third_party': |
| 381 assert revision == 'HEAD', 'revision was %s' % revision |
| 382 path = 'src/third_party/webrtc' |
| 383 |
378 if path and revision and path not in cfg.revisions: | 384 if path and revision and path not in cfg.revisions: |
379 cfg.revisions[path] = revision | 385 cfg.revisions[path] = revision |
OLD | NEW |