We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The hackable repo manager, built on libvcs. With great defaults, and presets if those don't work
libvcs
Finds configs (based on template loaders in django) and processes them them
CONFIG_LOADERS = [ { "BACKEND": "vcspull.configs.loaders.json.JSONLoader", "XDG_DIRS": True, # optionally "DIRS": [ "/custom/lookup/path", ], }, {"BACKEND": "vcspull.configs.loaders.json.YAMLLoader", "XDG_DIRS": True}, {"BACKEND": "vcspull.configs.loaders.json.TOMLLoader", "XDG_DIRS": True}, {"BACKEND": "vcspull.configs.loaders.json.PythonLoader", "XDG_DIRS": True}, ]
(inspired by context processors / middleware):
helpers that expand config, e.g.
repo: 'git+https://github.com/vcs-python/vcspull'
repo: remotes: origin: push: 'git+https://github.com/vcs-python/vcspull' pull: 'git+https://github.com/vcs-python/vcspull'
CONFIG_PROCESSORS = [ # before: # repo: 'git+https://github.com/vcs-python/vcspull' # after: # repo: # remotes: # origin: # push: 'git+https://github.com/vcs-python/vcspull' # pull: 'git+https://github.com/vcs-python/vcspull' "vcspull.configs.processors.simple_repo", # before: # repo: # origin: 'git+https://github.com/vcs-python/vcspull' # after: # repo: # origin: # push: 'git+https://github.com/vcs-python/vcspull' # pull: 'git+https://github.com/vcs-python/vcspull' "vcspull.configs.processors.simple_remote", ]
e.g. pip, npm/yarn, normal vcs URLs
pip
npm
yarn
Function to handle merge behavior when same repo name exists. `
'MERGE_BEHAVIOR: 'vcspull.config.merge.default'
default = deep_extend def overwrite(a, b, config_a, config_b): return b def extend(a, b, config_a, config_b): a.extend(b) def deep_extend(a, b, config_a, config_b): # deep merge code
above: hopefully if we pass config_a and config_b, if at all, they'd be immutable
see:https://github.com/TehShrike/deepmerge#custommerge
VCS_BACKENDS = { 'git': 'libvcs.git.Git', 'svn': 'libvcs.svn.Svn' 'hg': 'libvcs.hg.Mercurial' }
Allows people to override with custom behavior, esp. overriding sync()
sync()
{ "extends": "vcspull.settings.default", "CONFIG_LOADERS": [], "CONFIG_PROCESSORS": [] }
json
Strip removing trailing commas and comments
VCSPull(settings='str_or_dict', init=True)
vp = VCSPull(settings='vcspull.config.default') vp = VCSPull(settings='~/.config/vcspull/settings.py') vp = VCSPull(settings='~/.config/vcspull/settings.json')
vp = VCSPull(settings='vcspull.config.default')
vp = VCSPull(settings='~/.config/vcspull/settings.py')
vp = VCSPull(settings='~/.config/vcspull/settings.json')
Without initializing / finding configs:
vp = VCSPull(settings='~/.config/vcspull/settings.json', init=False)
vp.settings vp.init() # Finds configs via loaders, parses via backends, builds index of repos
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The hackable repo manager, built on
libvcs
. With great defaults, and presets if those don't workConfig Loaders and backends
Finds configs (based on template loaders in django) and processes them them
Config processors
(inspired by context processors / middleware):
helpers that expand config, e.g.
URL Parsers / adapters
e.g.
pip
,npm
/yarn
, normal vcs URLsMerge / conflict resolutions
Function to handle merge behavior when same repo name exists. `
'MERGE_BEHAVIOR: 'vcspull.config.merge.default'
above: hopefully if we pass config_a and config_b, if at all, they'd be immutable
see:https://github.com/TehShrike/deepmerge#custommerge
VCS backends
Allows people to override with custom behavior, esp. overriding
sync()
Initialization
vcspull settings:
Consider a
json
wrapper for jsoncStrip removing trailing commas and comments
VCSPull(settings='str_or_dict', init=True)
vp = VCSPull(settings='vcspull.config.default')
vp = VCSPull(settings='~/.config/vcspull/settings.py')
vp = VCSPull(settings='~/.config/vcspull/settings.json')
Without initializing / finding configs:
vp = VCSPull(settings='~/.config/vcspull/settings.json', init=False)
The text was updated successfully, but these errors were encountered: