All Projects → vcs-python → libvcs

vcs-python / libvcs

Licence: MIT license
⚙️ Lite, typed, pythonic utilities for git, svn, mercurial, etc.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to libvcs

Nbdime
Tools for diffing and merging of Jupyter notebooks.
Stars: ✭ 2,135 (+4865.12%)
Mutual labels:  mercurial, vcs, hg
Source Integration
Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more
Stars: ✭ 167 (+288.37%)
Mutual labels:  svn, subversion, vcs
Vim Signify
➕ Show a diff using Vim its sign column.
Stars: ✭ 2,390 (+5458.14%)
Mutual labels:  mercurial, subversion, vcs
ohloh scm
The Ohloh source control management library
Stars: ✭ 58 (+34.88%)
Mutual labels:  svn, subversion, hg
Scm Manager
The easiest way to share and manage your Git, Mercurial and Subversion repositories over http.
Stars: ✭ 50 (+16.28%)
Mutual labels:  svn, subversion
Svn Stash
It's like git stash , but for Subversion.
Stars: ✭ 49 (+13.95%)
Mutual labels:  svn, subversion
Node Svn Spawn
Easy way to access svn repository with node.js.
Stars: ✭ 85 (+97.67%)
Mutual labels:  svn, subversion
Phabricator
Effective June 1, 2021: Phabricator is no longer actively maintained.
Stars: ✭ 12,225 (+28330.23%)
Mutual labels:  svn, hg
Vcs
VCS Repo management through a common interface in Go
Stars: ✭ 171 (+297.67%)
Mutual labels:  svn, vcs
Vcspull
🔄 synchronize projects via yaml/json manifest. built on libvcs
Stars: ✭ 187 (+334.88%)
Mutual labels:  svn, vcs
proxychanger
Go tool to change system and applications proxy
Stars: ✭ 15 (-65.12%)
Mutual labels:  svn, subversion
Subclipse
Subclipse - Eclipse SVN Provider
Stars: ✭ 421 (+879.07%)
Mutual labels:  svn, subversion
vcs
PHP interface for version control systems
Stars: ✭ 59 (+37.21%)
Mutual labels:  svn, vcs
Websvn
Fork from WebSVN
Stars: ✭ 66 (+53.49%)
Mutual labels:  svn, subversion
svn2git
Tool to help and automate migration from SVN to GitLab
Stars: ✭ 34 (-20.93%)
Mutual labels:  svn, subversion
docker-svn-server
A Docker image running a simple Dockerised Subversion server, using `svnserve`.
Stars: ✭ 27 (-37.21%)
Mutual labels:  svn, subversion
sql-source-control
Simple CLI for getting SQL into source control systems.
Stars: ✭ 49 (+13.95%)
Mutual labels:  mercurial, svn
Commit
Commit message editor
Stars: ✭ 102 (+137.21%)
Mutual labels:  mercurial, hg
autorevision
A script for extracting version information useful in release/build scripting.
Stars: ✭ 73 (+69.77%)
Mutual labels:  svn, hg
atom-hg
Mercurial support for Atom text editor. Works on Linux, Mac OS X and Windows.
Stars: ✭ 27 (-37.21%)
Mutual labels:  mercurial

libvcs · Python Package License Code Coverage

libvcs is a lite, typed, pythonic tool box for detection and parsing of URLs, commanding, and syncing with git, hg, and svn. Powers vcspull.

Overview

Features for Git, Subversion, and Mercurial:

  • Detect and parse VCS URLs
  • Command VCS via python API
  • Sync repos locally

To get started, see the quickstart for more.

$ pip install --user libvcs

URL Parsing (experimental)

You can validate and parse Git, Mercurial, and Subversion URLs through libvcs.parse:

Validate:

>>> from libvcs.parse.git import GitUrl

>>> GitURL.is_valid(url='https://github.com/vcs-python/libvcs.git')
True

Parse and adjust a Git URL:

from libvcs.parse.git import GitUrl

>>> git_location = GitURL(url='[email protected]:vcs-python/libvcs.git')

>>> git_location
GitURL([email protected]:vcs-python/libvcs.git,
        hostname=github.com,
        path=vcs-python/libvcs,
        user=git,
        suffix=.git,
        matcher=core-git-scp)

Switch repo libvcs -> vcspull:

>>> git_location.path = 'vcs-python/vcspull'

>>> git_location.to_url()
'[email protected]:vcs-python/vcspull.git'

# Switch them to gitlab:
>>> git_location.hostname = 'gitlab.com'

# Export to a `git clone` compatible URL.
>>> git_location.to_url()
'[email protected]:vcs-python/vcspull.git'

See more in the parser document.

Commands (experimental)

Simple subprocess wrappers around git(1), hg(1), svn(1). Here is Git w/ Git.clone:

import pathlib
from libvcs.cmd.git import Git

git = Git(dir=pathlib.Path.cwd() / 'my_git_repo')
git.clone(url='https://github.com/vcs-python/libvcs.git')

Projects

Create a GitProject object of the project to inspect / checkout / update:

import pathlib
from libvcs.projects.git import GitProject

repo = GitProject(
   url="https://github.com/vcs-python/libvcs",
   dir=pathlib.Path().cwd() / "my_repo",
   remotes={
       'gitlab': 'https://gitlab.com/vcs-python/libvcs'
   }
)

Update / clone repo:

>>> r.update_repo()

Get revision:

>>> r.get_revision()
u'5c227e6ab4aab44bf097da2e088b0ff947370ab8'

Donations

Your donations fund development of new features, testing and support. Your money will go directly to maintenance and development of the project. If you are an individual, feel free to give whatever feels right for the value you get out of the project.

See donation options at https://www.git-pull.com/support.html.

More information

Docs Build Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].