Facilities for working with VCS repositories
Project description
Usage
jaraco.vcs provides classes for inspecting and working with repositories in the Mercurial and Git version control systems (VCS).
The classes provided are designed to use subprocess invocation to leverage the command-line interfaces of the VCS tools hg and git. An in-process RepoManager for Mercurial exists but has been disabled due to issues that arise when run in certain environments (namely setuptools sandboxing).
Auto Version Numbering
This project adds support for automatically generating project version numbers from a source code repository under development.
To use this feature, the project must follow the following assumptions:
Repo tags are used to indicate released versions.
Tag names are specified as the version only (i.e. 0.1 or v0.1 and not release-0.1)
Released versions currently must conform to the Version in packaging. Any tags that don’t match this scheme will be ignored.
Thereafter, use the RepoManager.get_current_version to determine the version of the local code. If the current revision is tagged with a valid version, that version will be used. Otherwise, the tags in the repo will be searched, the latest release will be found, and the function will infer the upcoming release version.
For example, if the repo contains the tags 0.1, 0.2, and 0.3 and the repo is not on any of those tags, get_current_version will return ‘0.3.1dev’ and get_current_version(increment=’0.1’) will return ‘0.4dev’.
Example:
>>> import jaraco.vcs >>> jaraco.vcs.repo().get_current_version() '9.0.1.dev0'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jaraco.vcs-2.0.0.tar.gz
.
File metadata
- Download URL: jaraco.vcs-2.0.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d0353bd47732202ce1d3a3d666de15e7c0e854226d3e9fbd8e9bb481c6fbf6 |
|
MD5 | 85d14db78a946e36f434d2402716fbcf |
|
BLAKE2b-256 | e9b78956035d36a8fc92a5bda79d0381614bc40c6f68fc8e9983038ab277c47f |
File details
Details for the file jaraco.vcs-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: jaraco.vcs-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dfab975bfc74520fe7d65cbf6de4bd5338555591218bc8bfbdd5d3a6d4b76bb |
|
MD5 | d99af659a14cdb6d2cd939dbbbc5eb45 |
|
BLAKE2b-256 | 1ce3c11fd3d713eb3403208bcaa3100e44d11d819d7539fc2af8ff5b987e2d87 |