repos: introduce a new repo conf parameter "type"

This will be used to carry the type of repo we are talking about. At the
moment it defaults to "git".

Signed-off-by: Henning Schild <henning.schild@siemens.com>
This commit is contained in:
Henning Schild
2018-01-05 16:00:28 +01:00
committed by Daniel Wagner
parent 9da82dba13
commit 0c7db599fd
5 changed files with 21 additions and 5 deletions

View File

@@ -69,12 +69,14 @@ class Repo:
self.path, self._layers)
@staticmethod
def factory(url, path, refspec, layers, disable_operations):
def factory(url, path, typ, refspec, layers, disable_operations):
"""
Return an instance Repo depending on params.
"""
# pylint: disable=too-many-arguments
return GitRepo(url, path, refspec, layers, disable_operations)
if typ == 'git':
return GitRepo(url, path, refspec, layers, disable_operations)
raise NotImplementedError('Repo typ "%s" not supported.' % typ)
@staticmethod
def get_root_path(path, environ):