From: SONOLET Aymeric Date: Tue, 5 Dec 2023 10:06:09 +0000 (+0100) Subject: Ajout retour erreur et beanchement source_update X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa7185e633d45ff3d0094f3fc6929b9fb8d31698;p=tools%2Fsat.git Ajout retour erreur et beanchement source_update --- diff --git a/commands/update.py b/commands/update.py index cc6daef..9f28c1b 100644 --- a/commands/update.py +++ b/commands/update.py @@ -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: diff --git a/src/system.py b/src/system.py index 2ac5470..3f869c3 100644 --- a/src/system.py +++ b/src/system.py @@ -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):