Skip to content

Commit 7ebbf75

Browse files
committed
address other SCMs
1 parent 721c9aa commit 7ebbf75

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tools/src/main/python/opengrok_tools/scm/cvs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

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

@@ -44,7 +44,7 @@ def reposync(self):
4444
cmd.execute()
4545
self.logger.info("output of {}:".format(cmd))
4646
self.logger.info(cmd.getoutputstr())
47-
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
47+
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
4848
self.logger.error("failed to perform update: command {}"
4949
"in directory {} exited with {}".
5050
format(hg_command, self.path, cmd.getretcode()))

tools/src/main/python/opengrok_tools/scm/git.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

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

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

5050
def reposync(self):

tools/src/main/python/opengrok_tools/scm/repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

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

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

0 commit comments

Comments
 (0)