@@ -852,12 +852,12 @@ def update_import_cmd(args):
852
852
repos_updated = []
853
853
854
854
# commit ci if dirty
855
- overlaytip = str (vc .tip (overlaydir )).strip ()
856
855
if vc .isDirty (overlaydir ):
857
856
vc .commit (overlaydir , "Update Python imports" )
858
- overlaytip = str (vc .tip (overlaydir )).strip ()
859
857
repos_updated .append (overlaydir )
860
858
859
+ overlaytip = str (vc .tip (overlaydir )).strip ()
860
+
861
861
# now allow dependent repos to hook into update
862
862
output = mx .OutputCapture ()
863
863
for repo in repos :
@@ -869,21 +869,24 @@ def update_import_cmd(args):
869
869
else :
870
870
print (mx .colorize ('%s command for %s.. skipped!' % (cmdname , basename ), color = 'magenta' , bright = True , stream = sys .stdout ))
871
871
872
- # update ci import in all our repos, commit the full update, and push verbosely
872
+ # update ci import in all our repos, commit the full update
873
873
prev_verbosity = mx ._opts .very_verbose
874
874
for repo in repos :
875
875
jsonnetfile = os .path .join (repo , "ci.jsonnet" )
876
876
with open (jsonnetfile , "w" ) as f :
877
877
f .write ('{ "overlay": "%s" }\n ' % overlaytip )
878
878
if vc .isDirty (repo ):
879
879
vc .commit (repo , "Update imports" )
880
- try :
881
- mx ._opts .very_verbose = True
882
- vc .git_command (repo , ["push" , "-u" , "origin" , "HEAD:%s" % current_branch ], abortOnError = True )
883
- finally :
884
- mx ._opts .very_verbose = prev_verbosity
885
880
repos_updated .append (repo )
886
881
882
+ # push all repos
883
+ for repo in repos_updated :
884
+ try :
885
+ mx ._opts .very_verbose = True
886
+ vc .git_command (repo , ["push" , "-u" , "origin" , "HEAD:%s" % current_branch ], abortOnError = True )
887
+ finally :
888
+ mx ._opts .very_verbose = prev_verbosity
889
+
887
890
if repos_updated :
888
891
mx .log ("\n " .join (["These repos were updated:" ] + repos_updated ))
889
892
0 commit comments