mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 03:49:10 +02:00
rrs/tools/common.py: Add get_pv_type function.
get_pv_type returns the type of pv can be git, svn, hg, etc. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
954e81d27a
commit
1208f6bc67
|
@ -26,3 +26,14 @@ def update_repo(fetchdir, repo_name, repo_url, pull, logger):
|
|||
out = utils.runcmd("git fetch", path, logger = logger)
|
||||
|
||||
return path
|
||||
|
||||
def get_pv_type(pv):
|
||||
pv_type = ''
|
||||
if '+git' in pv:
|
||||
pv_type = 'git'
|
||||
elif '+svn' in pv:
|
||||
pv_type = 'svn'
|
||||
elif '+hg' in pv:
|
||||
pv_type = 'hg'
|
||||
|
||||
return pv_type
|
||||
|
|
Loading…
Reference in New Issue
Block a user