GithubHelp home page GithubHelp logo

vcstool's Introduction

What is vcstool?

Vcstool is a version control system (VCS) tool, designed to make working with multiple repositories easier.

How does it work?

Vcstool operates on any folder from where it recursively searches for supported repositories. On these repositories vcstool invokes the native VCS client with the requested command (i.e. diff).

Which VCS types are supported?

Vcstool supports Git, Mercurial, Subversion, Bazaar.

How to use vcstool?

The script vcs can be used similar to the VCS clients git, hg etc. The help command provides a list of available commands with an additional description:

vcs help

By default vcstool searches for repositories under the current folder. Optionally one path (or multiple paths) can be passed to search for repositories at different locations:

vcs status /path/to/several/repos /path/to/other/repos /path/to/single/repo

Advanced features

Show log since last tag

The vcs log command supports the argument --limit-untagged which will output the log for all commits since the last tag.

Export set of repositories

The vcs export command outputs the path, vcs type, URL and version information for all repositories in YAML format. The output is usually piped to a file:

vcs export > my.repos

If the repository is currently on the tip of a branch the branch is followed. This implied that a later import might fetch a newer revision if the branch has evolved in the meantime. To make sure to store the exact revision in the exported data use the command line argument --exact.

Import set of repositories

The vcs import command clones all repositories which are passed in via stdin in YAML format. Usually the data of a previously exported file is piped in:

vcs import < my.repos

The import command also supports input in the rosinstall file format. Only for this command vcstool supports a pseudo client tar which fetches a tarball from an URL and unpacks its content.

Run arbitrary comands

The vcs custom command enables to pass arbitrary user-specified arguments to the vcs invocation. The set of repositories to operate on can optionally be restricted by the type:

vcs custom --git --args log --oneline -n 10

If your command should work on multiple repositories make sure to pass only generic arguments which work for all of these repository types.

How to install vcstool?

On Debian-based platforms the recommended method is to install the package python-vcstool. On Ubuntu this is done using apt-get:

sudo apt-get install python-vcstool

On other Systems, use the PyPI package:

pip install vcstool

Setup auto-completion

For the shells bash, tcsh and zsh vcstool can provide auto-completion of the various VCS commands. In order to enable that feature the shell specific completion file must be sourced.

For bash append the following line to the ~/.bashrc file:

source /usr/share/vcstool-completion/vcs.bash

For tcsh append the following line to the ~/.cshrc file:

source /usr/share/vcstool-completion/vcs.tcsh

For zsh append the following line to the ~/.zshrc file:

source /usr/share/vcstool-completion/vcs.zsh

How to contribute?

How to report problems?

Before reporting a problem please make sure that you are using the latest version. Issues can be filled on GitHub after making sure that this problem has not yet been reported.

Please make sure to include as much information, i.e. version numbers from vcstool, operating system, Python and a reproducible example of the commands which expose the problem.

How to try the latest changes?

Sourcing the setup.sh file prepends the src folder to the PYTHONPATH and the scripts folder to the PATH. Then vcstool can be used with the commands vcs-COMMAND (note the hyphen between vcs and command instead of a space).

Alternatively the develop command from Python setuptools can be used:

sudo python setup.py develop

vcstool's People

Contributors

dirk-thomas avatar

Watchers

James Cloos 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.