Skip to content

Commit 17937b3

Browse files
committed
rename check_outgoing -> strip_outgoing
1 parent 9d77022 commit 17937b3

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

tools/src/main/python/opengrok_tools/mirror.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565

6666
def worker(args):
67-
project_name, logdir, loglevel, backup_count, config, check_changes, check_outgoing, uri, \
67+
project_name, logdir, loglevel, backup_count, config, check_changes, strip_outgoing, uri, \
6868
source_root, batch, headers, timeout, api_timeout = args
6969

7070
if batch:
@@ -74,7 +74,7 @@ def worker(args):
7474
get_class_basename())
7575

7676
return mirror_project(config, project_name,
77-
check_changes, check_outgoing,
77+
check_changes, strip_outgoing,
7878
uri, source_root, headers=headers,
7979
timeout=timeout,
8080
api_timeout=api_timeout)

tools/src/main/python/opengrok_tools/utils/mirror.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def get_project_properties(project_config, project_name, hookdir):
168168
:param project_name: name of the project
169169
:param hookdir: directory with hooks
170170
:return: list of properties: prehook, posthook, hook_timeout,
171-
command_timeout, use_proxy, ignored_repos, check_changes, ignore_errors
171+
command_timeout, use_proxy, ignored_repos, check_changes, strip_outgoing, ignore_errors
172172
"""
173173

174174
prehook = None
@@ -178,7 +178,7 @@ def get_project_properties(project_config, project_name, hookdir):
178178
use_proxy = False
179179
ignored_repos = None
180180
check_changes = None
181-
check_outgoing = None
181+
strip_outgoing = None
182182
ignore_errors = None
183183

184184
logger = logging.getLogger(__name__)
@@ -233,7 +233,7 @@ def get_project_properties(project_config, project_name, hookdir):
233233
logger.debug("incoming check = {}".format(check_changes))
234234

235235
if project_config.get(STRIP_OUTGOING_PROPERTY) is not None:
236-
check_outgoing = get_bool(logger, ("outgoing check for project {}".
236+
strip_outgoing = get_bool(logger, ("outgoing check for project {}".
237237
format(project_name)),
238238
project_config.get(STRIP_OUTGOING_PROPERTY))
239239
logger.debug("outgoing check = {}".format(check_changes))
@@ -248,7 +248,7 @@ def get_project_properties(project_config, project_name, hookdir):
248248
ignored_repos = []
249249

250250
return prehook, posthook, hook_timeout, command_timeout, \
251-
use_proxy, ignored_repos, check_changes, check_outgoing, ignore_errors
251+
use_proxy, ignored_repos, check_changes, strip_outgoing, ignore_errors
252252

253253

254254
def process_hook(hook_ident, hook, source_root, project_name, proxy,
@@ -423,15 +423,15 @@ def process_outgoing(repos, project_name):
423423
return ret
424424

425425

426-
def mirror_project(config, project_name, check_changes, check_outgoing, uri,
426+
def mirror_project(config, project_name, check_changes, strip_outgoing, uri,
427427
source_root, headers=None, timeout=None, api_timeout=None):
428428
"""
429429
Mirror the repositories of single project.
430430
:param config global configuration dictionary
431431
:param project_name: name of the project
432432
:param check_changes: check for changes in the project or its repositories
433433
and terminate if no change is found
434-
:param check_outgoing: check for outgoing changes in the repositories of the project,
434+
:param strip_outgoing: check for outgoing changes in the repositories of the project,
435435
strip the changes and wipe project data if such changes were found
436436
:param uri web application URI
437437
:param source_root source root
@@ -449,7 +449,7 @@ def mirror_project(config, project_name, check_changes, check_outgoing, uri,
449449
prehook, posthook, hook_timeout, command_timeout, use_proxy, \
450450
ignored_repos, \
451451
check_changes_proj, \
452-
check_outgoing_proj, \
452+
strip_outgoing_proj, \
453453
ignore_errors_proj = get_project_properties(project_config,
454454
project_name,
455455
config.
@@ -465,10 +465,10 @@ def mirror_project(config, project_name, check_changes, check_outgoing, uri,
465465
else:
466466
check_changes_config = check_changes_proj
467467

468-
if check_outgoing_proj is None:
469-
check_outgoing_config = config.get(STRIP_OUTGOING_PROPERTY)
468+
if strip_outgoing_proj is None:
469+
strip_outgoing_config = config.get(STRIP_OUTGOING_PROPERTY)
470470
else:
471-
check_outgoing_config = check_outgoing_proj
471+
strip_outgoing_config = strip_outgoing_proj
472472

473473
if ignore_errors_proj is None:
474474
ignore_errors = config.get(IGNORE_ERR_PROPERTY)
@@ -513,12 +513,12 @@ def mirror_project(config, project_name, check_changes, check_outgoing, uri,
513513
if check_changes_config is not None:
514514
check_changes = check_changes_config
515515

516-
if check_outgoing_config is not None:
517-
check_outgoing = check_outgoing_config
516+
if strip_outgoing_config is not None:
517+
strip_outgoing = strip_outgoing_config
518518

519519
# Check outgoing changes first. If there are any, such changes will be stripped
520520
# and the subsequent incoming check will do the right thing.
521-
if check_outgoing:
521+
if strip_outgoing:
522522
try:
523523
r = process_outgoing(repos, project_name)
524524
except RepositoryException as exc:

0 commit comments

Comments
 (0)