Skip to content
Snippets Groups Projects
Commit 92a85558 authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix argument ordering

parent 7976bdd0
No related branches found
No related tags found
No related merge requests found
...@@ -152,11 +152,9 @@ def expand_directives(root, directives): ...@@ -152,11 +152,9 @@ def expand_directives(root, directives):
sorted_globs = sorted(globs.keys(), sorted_globs = sorted(globs.keys(),
key=lambda g: len(git_glob(os.path.join(root, g))), key=lambda g: len(git_glob(os.path.join(root, g))),
reverse=True) reverse=True)
print('sorted_globs: ', sorted_globs)
out_globs = collections.OrderedDict() out_globs = collections.OrderedDict()
for glob_add in sorted_globs: for glob_add in sorted_globs:
who_add = globs[glob_add] who_add = globs[glob_add]
print('add: ', glob_add, who_add)
pre_items = [i for i in out_globs.items()] pre_items = [i for i in out_globs.items()]
out_globs[glob_add] = who_add.copy() out_globs[glob_add] = who_add.copy()
for glob_have, who_have in pre_items: for glob_have, who_have in pre_items:
...@@ -166,7 +164,7 @@ def expand_directives(root, directives): ...@@ -166,7 +164,7 @@ def expand_directives(root, directives):
if intersect: if intersect:
for f in files_add: for f in files_add:
if f not in intersect: 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: for who in who_have:
if who not in out_globs[glob_add]: if who not in out_globs[glob_add]:
out_globs[glob_add].append(who) out_globs[glob_add].append(who)
...@@ -186,7 +184,8 @@ def add_parent_to_globs(parent, globs, globs_dir): ...@@ -186,7 +184,8 @@ def add_parent_to_globs(parent, globs, globs_dir):
if intersect: if intersect:
for f in files_child: for f in files_child:
if f not in intersect: 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: for who in oglob_who:
if who not in gglob_who: if who not in gglob_who:
gglob_who.append(who) gglob_who.append(who)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment