Skip to content

Commit

Permalink
address other SCMs
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Jan 2, 2025
1 parent 721c9aa commit 7ebbf75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tools/src/main/python/opengrok_tools/scm/cvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

#
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
# Portions Copyright (c) 2020, Krystof Tulinger <[email protected]>
#

Expand All @@ -44,7 +44,7 @@ def reposync(self):
cmd.execute()
self.logger.info("output of {}:".format(cmd))
self.logger.info(cmd.getoutputstr())
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
self.logger.error("failed to perform update: command {}"
"in directory {} exited with {}".
format(hg_command, self.path, cmd.getretcode()))
Expand Down
4 changes: 2 additions & 2 deletions tools/src/main/python/opengrok_tools/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

#
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
# Portions Copyright (c) 2020, Krystof Tulinger <[email protected]>
#

Expand All @@ -44,7 +44,7 @@ def _configure_git_pull(self):
cmd = self.get_command(git_command, work_dir=self.path,
env_vars=self.env, logger=self.logger)
cmd.execute()
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
cmd.log_error("failed to configure git pull.ff")

def reposync(self):
Expand Down
4 changes: 2 additions & 2 deletions tools/src/main/python/opengrok_tools/scm/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

#
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
# Portions Copyright (c) 2020, Krystof Tulinger <[email protected]>
#

Expand Down Expand Up @@ -161,7 +161,7 @@ def _run_command(self, command):
cmd = self.get_command(command, work_dir=self.path,
env_vars=self.env, logger=self.logger)
cmd.execute()
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
cmd.log_error("failed to perform command {}".format(command))
status = cmd.getretcode()
if status == 0 and cmd.getstate() != Command.FINISHED:
Expand Down

0 comments on commit 7ebbf75

Please sign in to comment.