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:
parent
9210fe57b4
commit
dc8d15c3be
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user