diff --git a/git_cl.py b/git_cl.py index fcb0d5436..5cf3b16ae 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2781,7 +2781,7 @@ class ChangeDescription(object): # Next, maybe fill in OWNERS coverage gaps to either tbrs/reviewers. if add_owners_to: owners_db = owners.Database(change.RepositoryRoot(), - fopen=file, os_path=os.path) + fopen=open, os_path=os.path) missing_files = owners_db.files_not_covered_by(change.LocalPaths(), (tbrs | reviewers)) LOOKUP[add_owners_to].update( @@ -4944,7 +4944,7 @@ def CMDowners(parser, args): if options.show_all: for arg in args: base_branch = cl.GetCommonAncestorWithUpstream() - database = owners.Database(settings.GetRoot(), file, os.path) + database = owners.Database(settings.GetRoot(), open, os.path) database.load_data_needed_for([arg]) print('Owners for %s:' % arg) for owner in sorted(database.all_possible_owners([arg], None)): @@ -4963,7 +4963,7 @@ def CMDowners(parser, args): affected_files = [f.LocalPath() for f in change.AffectedFiles()] if options.batch: - db = owners.Database(change.RepositoryRoot(), file, os.path) + db = owners.Database(change.RepositoryRoot(), open, os.path) print('\n'.join(db.reviewers_for(affected_files, author))) return 0 @@ -4972,7 +4972,7 @@ def CMDowners(parser, args): change.RepositoryRoot(), author, [] if options.ignore_current else cl.GetReviewers(), - fopen=file, os_path=os.path, + fopen=open, os_path=os.path, disable_color=options.no_color, override_files=change.OriginalOwnersFiles(), ignore_author=options.ignore_self).run() diff --git a/split_cl.py b/split_cl.py index c08bf4da4..37190295a 100644 --- a/split_cl.py +++ b/split_cl.py @@ -208,7 +208,7 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run, assert refactor_branch_upstream, \ "Branch %s must have an upstream." % refactor_branch - owners_database = owners.Database(change.RepositoryRoot(), file, os.path) + owners_database = owners.Database(change.RepositoryRoot(), open, os.path) owners_database.load_data_needed_for([f.LocalPath() for f in files]) files_split_by_owners = GetFilesSplitByOwners(owners_database, files)