From: Cédric Aguerre Date: Fri, 23 Jun 2017 15:16:37 +0000 (+0200) Subject: Update git config after checkout X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff7880882c90372b0a12415931d6d66086017107;p=tools%2Fpvdeliv.git Update git config after checkout --- diff --git a/scripts/salome_download.py b/scripts/salome_download.py index dbbcd56..1fccf23 100644 --- a/scripts/salome_download.py +++ b/scripts/salome_download.py @@ -96,26 +96,8 @@ def __extractSrcFromGit(gitLoc,srcDir,pattern,use_pleiade_mirrors=False): pass assert(_status==0) - # Update git config - for key, val in submodules.items(): - if val != "": - local_command = "git config " - local_command += "-f .gitmodules " - local_command += "submodule.%s.url %s" % (key, val) - p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True) - p.communicate() - else: - # Update git config - for key, val in submodules.items(): - if val != "": - local_command = "git config " - local_command += "-f .gitmodules " - local_command += "submodule.%s.url %s" % (key, val) - p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True) - p.communicate() - # Fetch print("Fetching %s..."%dirGitLoc) assert(os.path.exists(os.path.join(dirGitLoc,".git"))) @@ -134,6 +116,15 @@ def __extractSrcFromGit(gitLoc,srcDir,pattern,use_pleiade_mirrors=False): if p_err: msg += p_err raise Exception(msg) + # Update git config + for key, val in submodules.items(): + if val != "": + local_command = "git config " + local_command += "-f .gitmodules " + local_command += "submodule.%s.url %s" % (key, val) + p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True) + p.communicate() + # Init and Update submodules if dirGitLoc in ["ParaView", "prerequisites-salome.paraview"]: p=subprocess.Popen(["git","submodule","update","--init","--recursive"],cwd=dirGitLoc)