Skip to main content

Utilities to normalize working with different Version Control Systems

Project description

Summary

vcsinfo gathers information about a source tree, supporting Git, Mercurial, and Perforce working directories.

Installation

pip install vcsinfo

Usage

Example usage using the vcsinfo project itself (git backend):

import vcsinfo

data = vcsinfo.detect_vcs(my_path)
data.name  # project name: 'vcsinfo'
data.branch  # branch name: 'main'
data.id  # native commit identification: '4bb323148e43543247afe066db0dbac0fcf45537'
data.upstream_repo  # upstream repo url: 'git@github.com/adobe/vcsinfo.git'
data.user  # user who performed the commit: 'saville'
data.id_short  # a short representation of the id: '4bb323'
data.number  # same as id if commits have increasing numbers, otherwise simulated an increasing commit number: 77
data.modified  # none if no local modifications, otherwise the epoch seconds of the most recently modified file: 1629746987
data.release  # string representing the current state of the branch: '77.I4bb323.M1629746987'
data.id_string  # string providing a unique id of branch and release: 'main-77.I4bb323.M1629746987'

# Retrieves a tuple of lists of modified changes in the changeset, see code
# for return format
data.status()

# List the files known to the VCS
data.list_files()

# Retrieves VCS information as a dict, optionally including full file information
data.info()
data.info(include_files=True)

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

vcsinfo-2.1.110.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

vcsinfo-2.1.110-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file vcsinfo-2.1.110.tar.gz.

File metadata

  • Download URL: vcsinfo-2.1.110.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vcsinfo-2.1.110.tar.gz
Algorithm Hash digest
SHA256 a91833fee288657ce9f9e2b3bec481f1f22bd69efbd423d48d989cd9e20cd703
MD5 fb853f6fc092f97739b709ac3135cdd3
BLAKE2b-256 68b94f1a4100d4dc79716ce6358db78d64df2fafa9dbee74f7dfc733168f8a34

See more details on using hashes here.

File details

Details for the file vcsinfo-2.1.110-py3-none-any.whl.

File metadata

  • Download URL: vcsinfo-2.1.110-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vcsinfo-2.1.110-py3-none-any.whl
Algorithm Hash digest
SHA256 05356fbf597c780573bccb994a4df8f4aa3d6e9623876a41b306370c594dbaaa
MD5 99304bf6cdef38256c465f898c5b4350
BLAKE2b-256 f47927f0c4ea9d76fe120ef5ee0d3622741234cfb89e9d350d042e78ff0ebde4

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