@@ -746,7 +746,7 @@ def update_import(name, suite_py, rev="origin/master"):
746
746
parent = os .path .join (SUITE .dir , ".." )
747
747
for dirpath ,dirnames ,filenames in os .walk (parent ):
748
748
if os .path .sep in os .path .relpath (dirpath , parent ):
749
- dirnames . clear () # we're looking for siblings or sibling-subdirs
749
+ dirnames = [] # we're looking for siblings or sibling-subdirs
750
750
elif name in dirnames :
751
751
dep_dir = os .path .join (os .path .join (dirpath ))
752
752
break
@@ -848,12 +848,6 @@ def update_import_cmd(args):
848
848
update_import (name , suite_py , rev = ("HEAD" if idx else "origin/master" ))
849
849
850
850
# copy files we inline from our imports
851
- shutil .copy (
852
- join (mx .dependency ("SULONG_LEGACY" ).output , "include" , "truffle.h" ),
853
- join (SUITE .dir , "graalpython" , "com.oracle.graal.python.cext" , "include" , "truffle.h" ))
854
- shutil .copy (
855
- join (mx .dependency ("SULONG_HOME" ).output , "include" , "polyglot.h" ),
856
- join (SUITE .dir , "graalpython" , "com.oracle.graal.python.cext" , "include" , "polyglot.h" ))
857
851
shutil .copy (
858
852
join (mx .suite ("truffle" ).dir , ".." , "common.json" ),
859
853
join (overlaydir , "python" , "graal-common.json" ))
@@ -868,10 +862,15 @@ def update_import_cmd(args):
868
862
repos_updated .append (overlaydir )
869
863
870
864
# now allow dependent repos to hook into update
865
+ output = mx .OutputCapture ()
871
866
for repo in repos :
872
- cmdname = "%s-update-import" % os .path .basename (repo )
873
- if mx .run_mx (["help" , cmdname ], nonZeroIsFatal = False , quiet = True ) == 0 :
867
+ basename = os .path .basename (repo )
868
+ cmdname = "%s-update-import" % basename
869
+ is_mx_command = mx .run_mx (["help" , cmdname ], out = output , err = output , nonZeroIsFatal = False , quiet = True ) == 0
870
+ if is_mx_command :
874
871
mx .run_mx ([cmdname , "--overlaydir=%s" % overlaydir ], suite = repo , nonZeroIsFatal = True )
872
+ else :
873
+ print (mx .colorize ('%s command for %s.. skipped!' % (cmdname , basename ), color = 'magenta' , bright = True , stream = sys .stdout ))
875
874
876
875
# update ci import in all our repos, commit the full update, and push verbosely
877
876
prev_verbosity = mx ._opts .very_verbose
@@ -889,7 +888,7 @@ def update_import_cmd(args):
889
888
repos_updated .append (repo )
890
889
891
890
if repos_updated :
892
- mx .log ("These repos were updated: " + ", " . join ( repos_updated ))
891
+ mx .log ("\n " . join ([ " These repos were updated:" ] + repos_updated ))
893
892
894
893
895
894
def python_style_checks (args ):
0 commit comments