API ReferenceΒΆ
libvcs exposes three public subsystems β URL parsing, command execution, and repository synchronization β plus a pytest plugin for test fixtures.
All APIs are pre-1.0 and may change between minor versions.
Pin to a range: libvcs>=0.39,<0.40.
SubsystemsΒΆ
URL Parsing
Detect, validate, and normalize Git / Hg / SVN URLs. Typed dataclasses with pip- and npm-style support.
Commands
Thin Python wrappers around git, hg, and svn CLIs.
Fine-grained control over individual VCS operations.
Sync
High-level clone-and-update for local repositories. One call to fetch or create a working copy.
pytest Plugin
Session-scoped fixtures for Git, SVN, and Mercurial repositories. Drop-in test isolation.