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 https://img.shields.io/badge/skeleton-2024-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 Repo 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 Repo.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


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-2.3.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

jaraco.vcs-2.3.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file jaraco_vcs-2.3.0.tar.gz.

File metadata

  • Download URL: jaraco_vcs-2.3.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for jaraco_vcs-2.3.0.tar.gz
Algorithm Hash digest
SHA256 c6601375b34a15ddfae383d2016a9a35d8cee58657e705b1bd5b68d8fe19d9f6
MD5 0b8b315bd99660a2787f2f0a05a2b865
BLAKE2b-256 c1b11375fc1054a00f37dcc530b94416783b0e6251f978386b6533da776db6ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jaraco.vcs-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for jaraco.vcs-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bd021929c56ef2b6a3948da21f94b4db2b4ef9c6082a2ef94693f42b62b5fcb
MD5 eefa90796141d6788c9f841098673eab
BLAKE2b-256 7ae33445f03fe7f0b89b103cf65e3ef54055d90acf067a217c8fec2b7330aa5c

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