git: rename "git_operation_disabled" to "operations_disabled"

Prepare for other version control systems and remove "git" from the
names.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
This commit is contained in:
Henning Schild 2018-01-05 16:00:23 +01:00 committed by Daniel Wagner
parent 9210fe57b4
commit dc8d15c3be
3 changed files with 7 additions and 7 deletions

View File

@ -211,7 +211,7 @@ class Config:
rep = Repo(url=url,
path=path,
layers=layers)
rep.disable_git_operations()
rep.disable_operations()
else:
path = path or os.path.join(self.kas_work_dir, name)
rep = Repo(url=url,

View File

@ -158,7 +158,7 @@ def _repo_fetch_async(config, repo):
"""
Start asynchronous repository fetch.
"""
if repo.git_operation_disabled:
if repo.operations_disabled:
return 0
if not os.path.exists(repo.path):
@ -233,7 +233,7 @@ def repo_checkout(config, repo):
"""
Checks out the correct revision of the repo.
"""
if repo.git_operation_disabled or repo.refspec is None:
if repo.operations_disabled or repo.refspec is None:
return
# Check if repos is dirty

View File

@ -41,13 +41,13 @@ class Repo:
self.refspec = refspec
self._layers = layers
self.name = os.path.basename(self.path)
self.git_operation_disabled = False
self.operations_disabled = False
def disable_git_operations(self):
def disable_operations(self):
"""
Disabled all git operation for this repository.
Disabled all version control operation for this repository.
"""
self.git_operation_disabled = True
self.operations_disabled = True
def __getattr__(self, item):
if item == 'layers':