Skip to main content

No project description provided

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: svine-0.1.1.tar.gz
  • Upload date:
  • Size: 11.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.1.tar.gz
Algorithm Hash digest
SHA256 581da35205980b520de2ff250e075775f96adb2d37242dfa2c8b84b2afe83e26
MD5 10cb104e84e7a39db9603b974f1126ed
BLAKE2b-256 76abcc38c76a1f687a40ba4f1c614e9ccceb2ab42c548e24fb3682baa81b97ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svine-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba5eae3225ee1b369ae5e88684a773f92c49e525d956298d784aa0c7c091baa9
MD5 282357e082cb1979b1de9fbb68c2d0c3
BLAKE2b-256 bbcf5a7f88cf03cd63f0927a3c370cfe482cda21e6a7b1d357b4470dce6cf1e3

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