Workdir Api¶
- open(path, dont_try=())¶
Parameters: path – a local path to the worktree preferable a py.path.local instance open a scm workdir
It uses the backend metadata to find the correct backend and won’t import unnecessary backends to keep the import time low
- checkout(source, target)¶
create a light checkout of the given source
- clone(source, target)¶
create a heavy checkout/clone of the given source
- class WorkDir(path, create=False, source=None)[source]¶
Basic Workdir API
Parameters: - path – base path
- create –
- commit(paths=(), message=None, user=None)[source]¶
Parameters: - path – the paths
- message – the commit message
- user – optional author name
commits the given paths/files with the given commit message and author
- class WorkDirWithParser(path, create=False, source=None)[source]¶
extension of the workdir class to support parsing needs
- cache(paths=(), recursive=False)[source]¶
return a mapping of name to cached states only necessary for messed up vcs’s
- cache_impl(paths=False, recursive=False)[source]¶
creates a list of vcs specific cache items only necessary by messed up vcs’s
in case of doubt - dont touch ^^
- parse_status_items(items, cache)[source]¶
default implementation
for each item in items invoke:
self.parse_status_item(item, cache)
Note
a more complex parser might need to overwrite