Skip to main content

Facilities for working with VCS repositories

Project description

https://img.shields.io/pypi/v/jaraco.vcs.svg https://img.shields.io/pypi/pyversions/jaraco.vcs.svg tests Ruff Code style: Black https://img.shields.io/badge/skeleton-2023-informational

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:

>>> from jaraco.vcs import RepoManager
>>> RepoManager().get_first_valid_manager().get_current_version()
'9.0.1.dev0'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaraco.vcs-1.0.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

jaraco.vcs-1.0.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file jaraco.vcs-1.0.0.tar.gz.

File metadata

  • Download URL: jaraco.vcs-1.0.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for jaraco.vcs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e27628f6974ef2cd5ae07ca5966456f436b1ffbd534d6de857be42f4fab9a24b
MD5 f2a58e0d002e82acd6b5550ec2e454d1
BLAKE2b-256 fc1221e8478447d329c6b8e71c73d6eceb78cd60135180c89b9ae6a114f5f609

See more details on using hashes here.

File details

Details for the file jaraco.vcs-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jaraco.vcs-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for jaraco.vcs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc18c2b01c26178cd1a95ec5e3a4e85b75fd39a9ce4710e66604fccf79db4777
MD5 2ab9187a17f1d3e80cd7dd280a293f8f
BLAKE2b-256 505108eb4a5348c5696ee80fe602423a2224f243d046b2965182ab12682b3595

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page