Commit 18f99c28 authored by dpranke@chromium.org's avatar dpranke@chromium.org

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
parent 604a5895
......@@ -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"
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment