@@ -168,7 +168,7 @@ def get_project_properties(project_config, project_name, hookdir):
168
168
:param project_name: name of the project
169
169
:param hookdir: directory with hooks
170
170
: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
172
172
"""
173
173
174
174
prehook = None
@@ -178,7 +178,7 @@ def get_project_properties(project_config, project_name, hookdir):
178
178
use_proxy = False
179
179
ignored_repos = None
180
180
check_changes = None
181
- check_outgoing = None
181
+ strip_outgoing = None
182
182
ignore_errors = None
183
183
184
184
logger = logging .getLogger (__name__ )
@@ -233,7 +233,7 @@ def get_project_properties(project_config, project_name, hookdir):
233
233
logger .debug ("incoming check = {}" .format (check_changes ))
234
234
235
235
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 {}" .
237
237
format (project_name )),
238
238
project_config .get (STRIP_OUTGOING_PROPERTY ))
239
239
logger .debug ("outgoing check = {}" .format (check_changes ))
@@ -248,7 +248,7 @@ def get_project_properties(project_config, project_name, hookdir):
248
248
ignored_repos = []
249
249
250
250
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
252
252
253
253
254
254
def process_hook (hook_ident , hook , source_root , project_name , proxy ,
@@ -423,15 +423,15 @@ def process_outgoing(repos, project_name):
423
423
return ret
424
424
425
425
426
- def mirror_project (config , project_name , check_changes , check_outgoing , uri ,
426
+ def mirror_project (config , project_name , check_changes , strip_outgoing , uri ,
427
427
source_root , headers = None , timeout = None , api_timeout = None ):
428
428
"""
429
429
Mirror the repositories of single project.
430
430
:param config global configuration dictionary
431
431
:param project_name: name of the project
432
432
:param check_changes: check for changes in the project or its repositories
433
433
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,
435
435
strip the changes and wipe project data if such changes were found
436
436
:param uri web application URI
437
437
:param source_root source root
@@ -449,7 +449,7 @@ def mirror_project(config, project_name, check_changes, check_outgoing, uri,
449
449
prehook , posthook , hook_timeout , command_timeout , use_proxy , \
450
450
ignored_repos , \
451
451
check_changes_proj , \
452
- check_outgoing_proj , \
452
+ strip_outgoing_proj , \
453
453
ignore_errors_proj = get_project_properties (project_config ,
454
454
project_name ,
455
455
config .
@@ -465,10 +465,10 @@ def mirror_project(config, project_name, check_changes, check_outgoing, uri,
465
465
else :
466
466
check_changes_config = check_changes_proj
467
467
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 )
470
470
else :
471
- check_outgoing_config = check_outgoing_proj
471
+ strip_outgoing_config = strip_outgoing_proj
472
472
473
473
if ignore_errors_proj is None :
474
474
ignore_errors = config .get (IGNORE_ERR_PROPERTY )
@@ -513,12 +513,12 @@ def mirror_project(config, project_name, check_changes, check_outgoing, uri,
513
513
if check_changes_config is not None :
514
514
check_changes = check_changes_config
515
515
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
518
518
519
519
# Check outgoing changes first. If there are any, such changes will be stripped
520
520
# and the subsequent incoming check will do the right thing.
521
- if check_outgoing :
521
+ if strip_outgoing :
522
522
try :
523
523
r = process_outgoing (repos , project_name )
524
524
except RepositoryException as exc :
0 commit comments