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.1.2.tar.gz (12.8 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.1.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: svine-0.1.2.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for svine-0.1.2.tar.gz
Algorithm Hash digest
SHA256 17aa9421367a12204831c356c6e4d101f40431f5f4c048417b2a0b1157c2b2fe
MD5 18f715e5b73b6be352e98b0bd91798c2
BLAKE2b-256 f98259e2820eaf5c9c0075008d6453bb304e2f12ea5685bf04f9434de1b832c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svine-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for svine-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e20f2cab1fc0640deb7efec8dab5998ee36d14f2f5f2ed002a0ec4e8d97faddf
MD5 ffce9f46960fa2badd47469241640fe3
BLAKE2b-256 8242185e264bf644fb2aabe794170f18a27367042fa5f133119cf31518943f93

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