]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Ajout retour erreur et beanchement source_update
authorSONOLET Aymeric <aymeric.sonolet@cea.fr>
Tue, 5 Dec 2023 10:06:09 +0000 (11:06 +0100)
committerSONOLET Aymeric <aymeric.sonolet@cea.fr>
Tue, 5 Dec 2023 10:06:09 +0000 (11:06 +0100)
commands/update.py
src/system.py

index cc6daef060ba0c61b18a3a18db325b858a6161a9..9f28c1bd00c4af2ce79f19b300f5a6b83ac1bac4 100644 (file)
@@ -105,7 +105,7 @@ def description():
     :rtype: str
     """
     return _(
-        "The update command gets the sources of "
+        "The update command updates the sources under git and gets the sources of "
         "the application products and apply the patches if there is any."
         "\n\nexample:\nsat update SALOME-master --products KERNEL,GUI"
     )
@@ -250,7 +250,7 @@ class UpdateOp:
             msg = _("Get the sources of the products ...")
             self.logger.write(msg, 5)
             args_source = self.args_appli + args_product_to_prepare_opt
-            res_source = self.runner.source(args_source, logger_add_link=self.logger)
+            res_source = self.runner.source_update(args_source, logger_add_link=self.logger)
             if res_source == 0:
                 self.logger.write("%s\n" % src.printcolors.printc(src.OK_STATUS), 5)
             else:
index 2ac54703a1e1af661f4a542044363916a5f4eb36..3f869c3cd57016e9e8beadf6838f4b8b36a52f4d 100644 (file)
@@ -199,7 +199,6 @@ exit $res
 def git_checkout(tag, git_options, where, logger, environment=None):
   '''Checkout sources from a git repository.
 87
-  :param from_what str: The remote git repository.
   :param tag str: The tag.
   :param git_options str: git options
   :param where str: The path where to extract.
@@ -219,7 +218,8 @@ git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(git_options)s --gue
 
   cmd=cmd.replace('date_format', '"%ai"')
   cmd=cmd.replace('--no-guess ', '')
-  launch_command(cmd, logger, where, environment)
+  isOk = launch_command(cmd, logger, where, environment)
+  return isOk
 
 def git_pull(from_what, tag, git_options, where, logger, environment=None):
   '''Checkout sources from a git repository.
@@ -243,7 +243,8 @@ git --git-dir=%(where_git)s --work-tree=%(where)s pull $(git_options)s --ff-only
   cmd = cmd % {'git_options': git_options, 'remote': from_what, 'tag': tag, 'where': str(where), 'where_git': where_git}
 
   cmd=cmd.replace('date_format', '"%ai"')
-  launch_command(cmd, logger, where, environment)
+  isOk = launch_command(cmd, logger, where, environment)
+  return isOk
 
 
 def launch_command(cmd, logger, where, environment):