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.1.tar.gz (13.2 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.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for svine-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6999019f675fde8e1b36218012e22c7860b8dff89665c9f1d84af9cb58b55d97
MD5 b8a74517276615943a65f5883b2a2d4c
BLAKE2b-256 4001aff1625d4880693578decf1cb1aa1be58407ed7d180bd2601b6826d69a66

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for svine-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07df6c17de431c4faf573df64eee68ac5931f14a287ab64847ace485926fec97
MD5 447b75ea40ffbd3dc33914aeea64ad0d
BLAKE2b-256 cbc3927ec5c8e96a3beb86bd5ab0199806275784ef1fa0b45689921345bca47c

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