utils.repo_info module¶
Tools to collect information about the repository
- get_dirt_hash(repo=None)[source]¶
Get a SHA1 hash of all sources of dirt (modified tracked files). Explicitly, we collect all such files, hash their contents one by one, concatenate all hashes and hash them again (to avoid loading many large files in memory). If a file was deleted, its filenamed is hashed
- Parameters
repo –
- Returns
hash summary of all the dirt elements
- Return type
str
- get_git_summary(repo=None)[source]¶
Generate a string summarizing the status of the repo The format is <commit hash>:<pip freeze hash>[:<dirt hash>]
- Parameters
repo –
- Returns
- Return type
str
- get_pipfreeze_hash()[source]¶
Get a hash of the libraries installed in the current environment - generated by pip freeze
- get_repo()[source]¶
Get a repository object for the working directory
- Returns
the repository at the current working directory
- Return type
git.Repo