Giter Club home page Giter Club logo

vcsinfo's Introduction

vcsinfo

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: '[email protected]/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)

vcsinfo's People

Contributors

toddtomkinson avatar bluesliverx avatar herlo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.