| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 """Define the supported projects.""" | 4 """Define the supported projects.""" |
| 5 | 5 |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 project_bases = [ | 246 project_bases = [ |
| 247 '^%s/trunk/src(|/.*)$' % re.escape(base) for base in CHROME_SVN_BASES] | 247 '^%s/trunk/src(|/.*)$' % re.escape(base) for base in CHROME_SVN_BASES] |
| 248 | 248 |
| 249 aliases = ( | 249 aliases = ( |
| 250 # Old path. | 250 # Old path. |
| 251 'git.chromium.org/git/chromium', | 251 'git.chromium.org/git/chromium', |
| 252 # New path. | 252 # New path. |
| 253 'git.chromium.org/chromium/src', | 253 'git.chromium.org/chromium/src', |
| 254 'chromium.googlesource.com/chromium/src', | 254 'chromium.googlesource.com/chromium/src', |
| 255 'chromium.googlesource.com/a/chromium/src', |
| 255 ) | 256 ) |
| 256 project_bases.extend( | 257 project_bases.extend( |
| 257 r'^https?\:\/\/%s(?:\.git)?%s$' % (re.escape(i), BRANCH_MATCH) | 258 r'^https?\:\/\/%s(?:\.git)?%s$' % (re.escape(i), BRANCH_MATCH) |
| 258 for i in aliases) | 259 for i in aliases) |
| 259 verifiers_no_patch = [ | 260 verifiers_no_patch = [ |
| 260 project_base.ProjectBaseUrlVerifier(project_bases), | 261 project_base.ProjectBaseUrlVerifier(project_bases), |
| 261 reviewer_lgtm.ReviewerLgtmVerifier( | 262 reviewer_lgtm.ReviewerLgtmVerifier( |
| 262 _get_chromium_committers(), | 263 _get_chromium_committers(), |
| 263 [re.escape(user)]), | 264 [re.escape(user)]), |
| 264 ] | 265 ] |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 project_bases = [ | 672 project_bases = [ |
| 672 '^%s/trunk/%s(|/.*)$' % (re.escape(base), path) | 673 '^%s/trunk/%s(|/.*)$' % (re.escape(base), path) |
| 673 for base in CHROME_SVN_BASES | 674 for base in CHROME_SVN_BASES |
| 674 ] | 675 ] |
| 675 aliases = ( | 676 aliases = ( |
| 676 # Old path. | 677 # Old path. |
| 677 'git.chromium.org/git/chromium/tools', | 678 'git.chromium.org/git/chromium/tools', |
| 678 # New path. | 679 # New path. |
| 679 'git.chromium.org/chromium/tools', | 680 'git.chromium.org/chromium/tools', |
| 680 'chromium.googlesource.com/chromium/tools', | 681 'chromium.googlesource.com/chromium/tools', |
| 682 'chromium.googlesource.com/a/chromium/tools', |
| 681 ) | 683 ) |
| 682 project_bases.extend( | 684 project_bases.extend( |
| 683 r'^https?\:\/\/%s\/([a-z0-9\-_]+)(?:\.git)?%s$' % ( | 685 r'^https?\:\/\/%s\/([a-z0-9\-_]+)(?:\.git)?%s$' % ( |
| 684 re.escape(i), BRANCH_MATCH) for i in aliases) | 686 re.escape(i), BRANCH_MATCH) for i in aliases) |
| 685 return _internal_simple(path, project_bases, user, root_dir, rietveld_obj) | 687 return _internal_simple(path, project_bases, user, root_dir, rietveld_obj) |
| 686 | 688 |
| 687 | 689 |
| 688 def _gen_chromium_deps(user, root_dir, rietveld_obj, _no_try): | 690 def _gen_chromium_deps(user, root_dir, rietveld_obj, _no_try): |
| 689 """Generates a PendingManager commit queue for | 691 """Generates a PendingManager commit queue for |
| 690 chrome/trunk/deps/. | 692 chrome/trunk/deps/. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 """List the projects that can be managed by the commit queue.""" | 736 """List the projects that can be managed by the commit queue.""" |
| 735 return sorted( | 737 return sorted( |
| 736 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) | 738 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) |
| 737 | 739 |
| 738 | 740 |
| 739 def load_project(project, user, root_dir, rietveld_obj, no_try): | 741 def load_project(project, user, root_dir, rietveld_obj, no_try): |
| 740 """Loads the specified project.""" | 742 """Loads the specified project.""" |
| 741 assert os.path.isabs(root_dir) | 743 assert os.path.isabs(root_dir) |
| 742 return getattr(sys.modules[__name__], '_gen_' + project)( | 744 return getattr(sys.modules[__name__], '_gen_' + project)( |
| 743 user, root_dir, rietveld_obj, no_try) | 745 user, root_dir, rietveld_obj, no_try) |
| OLD | NEW |