plugins_config.vim checks for existence of sources_non_forked_cache folder before running call pathogen#infect(s:vim_runtime.'/sources_non_forked_cache/{}'). If sources_non_forked_cache does not exist, it will copy contents of sources_non_forked to sources_non_forked_cache.
update_plugins.py copies contents of sources_non_forked folder to sources_non_forked_cache folder (gitignored) if sources_non_forked_cache does not exist yet. Afterwards, it updates the contents of sources_non_forked_cache from the web. If the update fails, user would at least have contents of sources_non_forked in sources_non_forked_cache.
README.md has been updated accordingly.
Benefits
git reset --hard and git clean -d --force is no longer necessary in the update process. Addresses #615. git pull && python update_plugins.py would be sufficient.
After running git pull to fetch this update, existing users of vimrc can either run vim or python update_plugins.py to trigger creation of sources_non_forked_cache folder.
vimrc maintainer can continue to push changes to sources_non_forked as per normal.
Possible issues
Is there an OS-portable equivalent for call system("cp -r " . s:vim_runtime.'/sources_non_forked' . " " . s:vim_runtime.'/sources_non_forked_cache')? It works on *nix/PowerShell/Git-For-Windows but not Windows CMD.
Changes
plugins_config.vim
checks for existence ofsources_non_forked_cache
folder before runningcall pathogen#infect(s:vim_runtime.'/sources_non_forked_cache/{}')
. Ifsources_non_forked_cache
does not exist, it will copy contents ofsources_non_forked
tosources_non_forked_cache
.update_plugins.py
copies contents ofsources_non_forked
folder tosources_non_forked_cache
folder (gitignored) ifsources_non_forked_cache
does not exist yet. Afterwards, it updates the contents ofsources_non_forked_cache
from the web. If the update fails, user would at least have contents ofsources_non_forked
insources_non_forked_cache
.README.md
has been updated accordingly.Benefits
git reset --hard
andgit clean -d --force
is no longer necessary in the update process. Addresses #615.git pull && python update_plugins.py
would be sufficient.git pull
to fetch this update, existing users of vimrc can either runvim
orpython update_plugins.py
to trigger creation ofsources_non_forked_cache
folder.sources_non_forked
as per normal.Possible issues
Is there an OS-portable equivalent for
call system("cp -r " . s:vim_runtime.'/sources_non_forked' . " " . s:vim_runtime.'/sources_non_forked_cache')
? It works on *nix/PowerShell/Git-For-Windows but not Windows CMD.