From 92a85558bc807a8422c784b1850d3032823fa263 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 14 Jul 2017 11:36:09 -0700 Subject: [PATCH] Fix argument ordering --- tools/mkowners/mkowners.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/mkowners/mkowners.py b/tools/mkowners/mkowners.py index 1e39fb5a1fd..4805df45dfc 100755 --- a/tools/mkowners/mkowners.py +++ b/tools/mkowners/mkowners.py @@ -152,11 +152,9 @@ def expand_directives(root, directives): sorted_globs = sorted(globs.keys(), key=lambda g: len(git_glob(os.path.join(root, g))), reverse=True) - print('sorted_globs: ', sorted_globs) out_globs = collections.OrderedDict() for glob_add in sorted_globs: who_add = globs[glob_add] - print('add: ', glob_add, who_add) pre_items = [i for i in out_globs.items()] out_globs[glob_add] = who_add.copy() for glob_have, who_have in pre_items: @@ -166,7 +164,7 @@ def expand_directives(root, directives): if intersect: for f in files_add: if f not in intersect: - out_globs[os.path.relpath(root, f)] = who_add + out_globs[os.path.relpath(f, start=root)] = who_add for who in who_have: if who not in out_globs[glob_add]: out_globs[glob_add].append(who) @@ -186,7 +184,8 @@ def add_parent_to_globs(parent, globs, globs_dir): if intersect: for f in files_child: if f not in intersect: - globs[f] = gglob_who_orig.copy() + who = gglob_who_orig.copy() + globs[os.path.relpath(f, start=globs_dir)] = who for who in oglob_who: if who not in gglob_who: gglob_who.append(who)