From d9ffe511cf3078c6e9d96264f2150a2d6dca5dba Mon Sep 17 00:00:00 2001 From: Timo Sand Date: Fri, 15 Feb 2013 15:16:30 +0000 Subject: [PATCH] CHNAGED: Added function to make list of bundles with commits,branches and tags --- autoload/vundle/scripts.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index ded6a46..dab9ec5 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -74,6 +74,20 @@ func! s:view_changelog() wincmd P | wincmd H endf +func! vundle#scripts#get_bundles() + let branch_bundles = filter(copy(g:bundles), "has_key(v:val, 'branch')") + let commit_bundles = filter(copy(g:bundles), "has_key(v:val, 'commit')") + let tag_bundles = filter(copy(g:bundles), "has_key(v:val, 'tag')") + let plain_bundles = filter(copy(g:bundles), "! has_key(v:val, 'tag') && ! has_key(v:val, 'commit') && ! has_key(v:val, 'branch')") + + let branch_bundle_names = map(copy(branch_bundles), 'printf("%s, branch:%s", v:val.name_spec, v:val.branch )') + let commit_bundle_names = map(copy(commit_bundles), 'printf("%s, commit:%s", v:val.name_spec, v:val.commit )') + let tag_bundle_names = map(copy(tag_bundles) , 'printf("%s, tag:%s", v:val.name_spec, v:val.tag )') + let plain_bundle_names = map(copy(plain_bundles) , 'v:val.name_spec') + + return extend(extend(extend(plain_bundle_names, branch_bundle_names), commit_bundle_names), tag_bundle_names) +endf + func! vundle#scripts#bundle_names(names) return map(copy(a:names), ' printf("Bundle ' ."'%s'".'", v:val) ') endf