From dc8d15c3befe8753a7cdcf64b7b7bd0ff0fa19da Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Fri, 5 Jan 2018 16:00:23 +0100 Subject: [PATCH] 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 --- kas/config.py | 2 +- kas/libkas.py | 4 ++-- kas/repos.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kas/config.py b/kas/config.py index 5e42dd9..e27a2e4 100644 --- a/kas/config.py +++ b/kas/config.py @@ -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, diff --git a/kas/libkas.py b/kas/libkas.py index 19eafc9..910d269 100644 --- a/kas/libkas.py +++ b/kas/libkas.py @@ -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 diff --git a/kas/repos.py b/kas/repos.py index ba965c8..75bc413 100644 --- a/kas/repos.py +++ b/kas/repos.py @@ -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':