New tests, Cloner.sync() without tests, but recursive
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
@@ -184,7 +184,7 @@ class RepoTool:
|
||||
|
||||
@__check_initialized
|
||||
def fetch(self) -> bool:
|
||||
log.info("Fetching repo state")
|
||||
log.info("Fetching repo :)")
|
||||
if not len(self._repo.remotes):
|
||||
log.warning(f"Repo: {self._path} does not contain any remotes!")
|
||||
return False
|
||||
@@ -214,6 +214,10 @@ class RepoTool:
|
||||
log.debug(f"Repo fingerprint is {x}")
|
||||
return x
|
||||
|
||||
@__check_initialized
|
||||
def list_commits(self, max_depth: Optional[int] = None):
|
||||
return self._repo.iter_commits(all = True, max_count = max_depth)
|
||||
|
||||
@__check_initialized
|
||||
def list_submodules(self, commit: str = "HEAD") -> Union[list, bool]:
|
||||
commit = self._repo.commit(commit)
|
||||
@@ -241,7 +245,7 @@ class RepoTool:
|
||||
def list_submodules_history(self, limit_of_commits: Optional[int] = None) -> Union[list, bool]:
|
||||
|
||||
log.info(f"Listing repository submodule history")
|
||||
iterator = self._repo.iter_commits(all = True, max_count = limit_of_commits)
|
||||
iterator = self.list_commits(limit_of_commits)
|
||||
submodules = set()
|
||||
counter: int = 0
|
||||
last_status = time.time()
|
||||
|
||||
Reference in New Issue
Block a user