Salome HOME
write the called command to the log file
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 16 Mar 2016 13:37:30 +0000 (14:37 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 16 Mar 2016 13:37:30 +0000 (14:37 +0100)
commands/patch.py
src/system.py

index fb97f0c399f5de81b1924f68bce9ba67dd8f021e..90ae305bcb78ca4f6f4fb343a76162efc4066c4c 100644 (file)
@@ -66,6 +66,9 @@ def apply_patch(config, product_info, logger):
             patch_cmd = "python %s -p1 -- < %s" % (patch_exe, patch)
 
             logger.write(("    >%s\n" % patch_cmd),5)
+            
+            logger.logTxtFile.write("\n    >%s\n" % patch_cmd)
+            logger.logTxtFile.flush()
             res_cmd = (subprocess.call(patch_cmd, 
                                    shell=True, 
                                    cwd=product_info.source_dir,
index c0d517855c3705dd276a0bf3cf8bc58b259b43e6..98b2d3d3baa518a3c1ed7aeabbf4735ae4d44b99 100644 (file)
@@ -68,6 +68,8 @@ def git_extract(from_what, tag, where, logger):
 
     logger.write(command + "\n", 5)
 
+    logger.logTxtFile.write("\n" + command + "\n")
+    logger.logTxtFile.flush()
     res = subprocess.call(command, cwd=str(where.dir()), shell=True,
                           stdout=logger.logTxtFile, stderr=subprocess.STDOUT)
     return (res == 0)
@@ -105,12 +107,13 @@ def cvs_extract(protocol, user, server, base, tag, product, where,
             { 'root': server, 'base': base, 'where': str(where.base()),
               'tag': opttag, 'product': product, 'command': cmd }
 
-    logger.logTxtFile.write(command + "\n")
     logger.write(command + "\n", 5)
 
     if not where.dir().exists():
         where.dir().make()
-        
+
+    logger.logTxtFile.write("\n" + command + "\n")
+    logger.logTxtFile.flush()        
     res = subprocess.call(command, cwd=str(where.dir()), shell=True,
                           stdout=logger.logTxtFile, stderr=subprocess.STDOUT)
     return (res == 0)
@@ -138,6 +141,8 @@ def svn_extract(user, from_what, tag, where, logger, checkout=False):
     logger.logTxtFile.write(command + "\n")
     
     logger.write(command + "\n", 5)
+    logger.logTxtFile.write("\n" + command + "\n")
+    logger.logTxtFile.flush()
     res = subprocess.call(command, cwd=str(where.dir()), shell=True,
                           stdout=logger.logTxtFile, stderr=subprocess.STDOUT)
     return (res == 0)
\ No newline at end of file