Skip to content

Commit aef397c

Browse files
author
Vladimir Kotal
authored
fix command printing (#2714)
1 parent d35dc1a commit aef397c

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

opengrok-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, Oracle and/or its affiliates. All rights reserved.
21+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2222
#
2323

2424
from ..utils.command import Command
@@ -45,7 +45,7 @@ def reposync(self):
4545
cmd = self.getCommand(hg_command, work_dir=self.path,
4646
env_vars=self.env, logger=self.logger)
4747
cmd.execute()
48-
self.logger.info("outout of " + cmd + ":")
48+
self.logger.info("output of {}:".format(cmd))
4949
self.logger.info(cmd.getoutputstr())
5050
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
5151
self.logger.error("failed to perform update: command {}"

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

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

2020
#
21-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
21+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2222
#
2323

2424
from ..utils.command import Command
@@ -45,7 +45,7 @@ def reposync(self):
4545
cmd = self.getCommand(git_command, work_dir=self.path,
4646
env_vars=self.env, logger=self.logger)
4747
cmd.execute()
48-
self.logger.info("output of " + git_command + ":")
48+
self.logger.info("output of {}:".format(git_command))
4949
self.logger.info(cmd.getoutputstr())
5050
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
5151
cmd.log_error("failed to perform pull")
@@ -58,7 +58,7 @@ def incoming(self):
5858
cmd = self.getCommand(git_command, work_dir=self.path,
5959
env_vars=self.env, logger=self.logger)
6060
cmd.execute()
61-
self.logger.info("output of " + git_command + ":")
61+
self.logger.info("output of {}:".format(git_command))
6262
self.logger.info(cmd.geterroutputstr())
6363
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
6464
cmd.log_error("failed to perform pull")

opengrok-tools/src/main/python/opengrok_tools/scm/mercurial.py

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

2020
#
21-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
21+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2222
#
2323

2424
from ..utils.command import Command
@@ -45,7 +45,7 @@ def get_branch(self):
4545
cmd = self.getCommand(hg_command, work_dir=self.path,
4646
env_vars=self.env, logger=self.logger)
4747
cmd.execute()
48-
self.logger.info("output of " + cmd + ":")
48+
self.logger.info("output of {}:".format(cmd))
4949
self.logger.info(cmd.getoutputstr())
5050
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
5151
cmd.log_error("failed to get branch")
@@ -74,7 +74,7 @@ def reposync(self):
7474
cmd = self.getCommand(hg_command, work_dir=self.path,
7575
env_vars=self.env, logger=self.logger)
7676
cmd.execute()
77-
self.logger.info("output of " + cmd + ":")
77+
self.logger.info("output of {}:".format(cmd))
7878
self.logger.info(cmd.getoutputstr())
7979
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
8080
cmd.log_error("failed to perform pull")
@@ -88,7 +88,7 @@ def reposync(self):
8888
cmd = self.getCommand(hg_command, work_dir=self.path,
8989
env_vars=self.env, logger=self.logger)
9090
cmd.execute()
91-
self.logger.info("output of " + cmd + ":")
91+
self.logger.info("output of {}:".format(cmd))
9292
self.logger.info(cmd.getoutputstr())
9393
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
9494
cmd.log_error("failed to perform pull and update")
@@ -110,7 +110,7 @@ def incoming(self):
110110
cmd = self.getCommand(hg_command, work_dir=self.path,
111111
env_vars=self.env, logger=self.logger)
112112
cmd.execute()
113-
self.logger.info("output of " + cmd + ":")
113+
self.logger.info("output of {}:".format(cmd))
114114
self.logger.info(cmd.getoutputstr())
115115
retcode = cmd.getretcode()
116116
if cmd.getstate() != Command.FINISHED or retcode not in [0, 1]:

opengrok-tools/src/main/python/opengrok_tools/scm/repo.py

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

2020
#
21-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
21+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2222
#
2323

2424
from ..utils.command import Command
@@ -45,7 +45,7 @@ def reposync(self):
4545
cmd = self.getCommand(repo_command, work_dir=self.path,
4646
env_vars=self.env, logger=self.logger)
4747
cmd.execute()
48-
self.logger.info("output of " + cmd + ":")
48+
self.logger.info("output of {}:".format(cmd))
4949
self.logger.info(cmd.getoutputstr())
5050
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
5151
cmd.log_error("failed to perform sync")
@@ -58,7 +58,7 @@ def incoming(self):
5858
cmd = self.getCommand(repo_command, work_dir=self.path,
5959
env_vars=self.env, logger=self.logger)
6060
cmd.execute()
61-
self.logger.info("output of " + cmd + ":")
61+
self.logger.info("output of {}:".format(cmd))
6262
self.logger.info(cmd.getoutputstr())
6363
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
6464
cmd.log_error("failed to perform sync")

opengrok-tools/src/main/python/opengrok_tools/scm/svn.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, Oracle and/or its affiliates. All rights reserved.
21+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2222
#
2323

2424
from ..utils.command import Command
@@ -70,7 +70,7 @@ def reposync(self):
7070
cmd = self.getCommand(svn_command, work_dir=self.path,
7171
env_vars=self.env, logger=self.logger)
7272
cmd.execute()
73-
self.logger.info("output of " + cmd + ":")
73+
self.logger.info("output of {}:".format(cmd))
7474
self.logger.info(cmd.getoutputstr())
7575
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
7676
cmd.log_error("failed to perform update")

opengrok-tools/src/main/python/opengrok_tools/scm/teamware.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, Oracle and/or its affiliates. All rights reserved.
21+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2222
#
2323

2424
from ..utils.command import Command
@@ -71,7 +71,7 @@ def reposync(self):
7171
cmd = self.getCommand(bringover_command, work_dir=self.path,
7272
env_vars=self.env, logger=self.logger)
7373
cmd.execute()
74-
self.logger.info("output of " + cmd + ":")
74+
self.logger.info("output of {}:".format(cmd))
7575
self.logger.info(cmd.getoutputstr())
7676
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
7777
cmd.log_error("failed to perform bringover")

0 commit comments

Comments
 (0)