Use OldContents() for OWNERS files to do checks

BUG=141253
R=dpranke@chromium.org

Change-Id: Iacbc2f0571e725e4f2ccf5ea7878f101972289bb
Reviewed-on: https://chromium-review.googlesource.com/476610
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
This commit is contained in:
Jochen Eisinger
2017-04-13 10:55:06 +02:00
committed by Commit Bot
parent 7d1681b412
commit d0573ec067
7 changed files with 45 additions and 10 deletions

View File

@@ -25,7 +25,8 @@ class OwnersFinder(object):
def __init__(self, files, local_root, author,
fopen, os_path,
email_postfix='@chromium.org',
disable_color=False):
disable_color=False,
override_files=None):
self.email_postfix = email_postfix
if os.name == 'nt' or disable_color:
@@ -35,6 +36,7 @@ class OwnersFinder(object):
self.COLOR_RESET = ''
self.db = owners_module.Database(local_root, fopen, os_path)
self.db.override_files = override_files or {}
self.db.load_data_needed_for(files)
self.os_path = os_path
@@ -52,6 +54,7 @@ class OwnersFinder(object):
files = filtered_files
# Reload the database.
self.db = owners_module.Database(local_root, fopen, os_path)
self.db.override_files = override_files or {}
self.db.load_data_needed_for(files)
self.all_possible_owners = self.db.all_possible_owners(files, None)