From 18f99c2865f38903bd70cafee47eecedd36a41af Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Thu, 24 Mar 2011 00:49:21 +0000 Subject: [PATCH] For now, stop suggesting reviewers during 'gcl change'. This fixes an issue where we would suggest '*' and then choke on the text down the road. Also, the suggestions were not yet very useful. R=maruel@chromium.org Review URL: http://codereview.chromium.org/6722014 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79227 0039d316-1c4b-4281-b951-d872f2087c98 --- gcl.py | 15 --------------- tests/gcl_unittest.py | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/gcl.py b/gcl.py index ace9f6f3c..54c721cfb 100755 --- a/gcl.py +++ b/gcl.py @@ -764,12 +764,6 @@ def OptionallyDoPresubmitChecks(change_info, committing, args): return DoPresubmitChecks(change_info, committing, True) -def suggest_reviewers(change_info, affected_files): - owners_db = owners.Database(change_info.GetLocalRoot(), fopen=file, - os_path=os.path) - return owners_db.reviewers_for([f[1] for f in affected_files]) - - def defer_attributes(a, b): """Copy attributes from an object (like a function) to another.""" for x in dir(a): @@ -1099,15 +1093,6 @@ def CMDchange(args): affected_files = [x for x in other_files if file_re.match(x[0])] unaffected_files = [x for x in other_files if not file_re.match(x[0])] - if not change_info.reviewers: - files_for_review = affected_files[:] - files_for_review.extend(change_info.GetFiles()) - suggested_reviewers = suggest_reviewers(change_info, files_for_review) - if suggested_reviewers: - reviewers_re = re.compile(REVIEWERS_REGEX) - if not any(reviewers_re.match(l) for l in description.splitlines()): - description += '\n\nR=' + ','.join(suggested_reviewers) - description = description.rstrip() + '\n' separator1 = ("\n---All lines above this line become the description.\n" diff --git a/tests/gcl_unittest.py b/tests/gcl_unittest.py index 322586987..35bd6a98b 100755 --- a/tests/gcl_unittest.py +++ b/tests/gcl_unittest.py @@ -94,8 +94,8 @@ class GclUnittest(GclTestsBase): 'gclient_utils', 'getpass', 'json', 'main', 'need_change', 'need_change_and_args', 'no_args', 'optparse', 'os', 'owners', 'presubmit_support', 'random', 're', - 'string', 'subprocess', 'suggest_reviewers', 'sys', 'tempfile', - 'time', 'upload', 'urllib2', + 'string', 'subprocess', 'sys', 'tempfile', 'time', 'upload', + 'urllib2', ] # If this test fails, you should add the relevant test. self.compareMembers(gcl, members)