Browse Source

CHANGED: rev information gets passed along through all steps

pull/267/head
Timo Sand 13 years ago
parent
commit
a0d33895e3
3 changed files with 17 additions and 14 deletions
  1. +1
    -4
      autoload/vundle/config.vim
  2. +3
    -1
      autoload/vundle/installer.vim
  3. +13
    -9
      autoload/vundle/scripts.vim

+ 1
- 4
autoload/vundle/config.vim View File

@ -36,10 +36,7 @@ func! s:parse_options(opts)
if type(a:opts[0]) == type({})
return a:opts[0]
else
let foo = split(a:opts[0], ':')
let type = foo[0]
let name = foo[1]
return {type : name}
return {'rev' : a:opts[0]}
endif
endf


+ 3
- 1
autoload/vundle/installer.vim View File

@ -99,8 +99,10 @@ endf
func! vundle#installer#install(bang, name) abort
if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif
let args = split(a:name,', ')
let b = vundle#config#init_bundle(a:name, {})
let opts = (len(args) > 1) ? [substitute(args[1],"'",'','g')] : {}
let b = vundle#config#init_bundle(args[0], opts)
return s:sync(a:bang, b)
endf


+ 13
- 9
autoload/vundle/scripts.vim View File

@ -75,17 +75,21 @@ func! s:view_changelog()
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 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 plain_bundles = filter(copy(g:bundles), "! has_key(v:val, 'rev')")
let rev_bundles = filter(copy(g:bundles), "has_key(v:val, 'rev')")
"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')
let rev_bundle_names = map(copy(rev_bundles) , 'printf("%s, %s", v:val.name_spec, v:val.rev )')
return extend(extend(extend(plain_bundle_names, branch_bundle_names), commit_bundle_names), tag_bundle_names)
"return extend(extend(extend(plain_bundle_names, branch_bundle_names), commit_bundle_names), tag_bundle_names)
return extend(plain_bundle_names, rev_bundle_names)
endf
func! vundle#scripts#bundle_names(names)


Loading…
Cancel
Save