Skip to main content

A simple Python wrapper for a limited number of svn commands for mining Subversion repositories.

Project description

svine

Lightweight Python wrapper for a highly limited number of svn subcommands. Meant for use in mining Subversion repositories.

Installation

pip install svine

Usage

Setup for all use cases is the same:

from svine import SvnClient, SvnException

remote = SvnClient("https://svn.repository.url/whoever/still/uses/svn/")

svn log

Returns log entries in named tuples with fields for message (msg), author, revision and date.

try:
    for log_entry in remote.log():
        print(log_entry.msg)
except SvnException:
    # Handle
    pass

# Get latest log entry only
try:
    for log_entry in remote.log(limit=1):
        print(log_entry.author)
except SvnException:
    # Handle
    pass

svn info

Provides a named tuple with the info returned by the svn info subcommand. Fields are: "url", "relative_url", "entry_kind", "entry_path", "entry_revision", "repository_root", "repository_uuid", "wcinfo_wcroot_abspath", "wcinfo_schedule", "wcinfo_depth", "commit_author", "commit_date", "commit_revision".

try:
    info = remote.info()
    print(info.repository_root)
except SvnException:
    # Handle
    pass

svn list

Yields the contents only of the remote repository root directory.

try:
    for root_content in remote.list():
        print(root_content)
except SvnException:
    # Handle
    pass

# Prints, e.g.:
# 
# trunk/
# branches/
# tags/

Contributing

Contributions are generally welcome. Please open an issue to start the contribution process.

Please note that there are currently no plans or dedicated resources to do development or maintenance of this project.

Licenses

This project is compliant with the REUSE Specifications version 3.2. Applicable licenses are defined in REUSE.toml and the respective license texts are available in LICENSES/.

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

svine-0.2.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

svine-0.2.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file svine-0.2.0.tar.gz.

File metadata

  • Download URL: svine-0.2.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for svine-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8021286a1e88853c9f9cf03841234362bd5137b7dced66751718e110dc5b8884
MD5 304f733ac7184ba85d2921c3217d4d42
BLAKE2b-256 b97c8f9c47d675afb680b39251ad718b9e00a1eeb2472e6029c82a2c16d8f755

See more details on using hashes here.

File details

Details for the file svine-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: svine-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for svine-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c638ad4c431b71ca5dcf7de0b72fba1cc08b8c7c8c1c4b785ec9ced64e926a35
MD5 2f7ebf7b0b5ec8f39d54873a0b0d3fd0
BLAKE2b-256 8f4ad6b620c9c715f2c565cb22810a36a4ef83777cb1fe0bafc9f2392eff88ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page