Skip to main content

Crate subversion

Crate subversion 

Source
Expand description

Rust bindings for the Subversion version control system.

This crate provides idiomatic Rust bindings for the Subversion C libraries, enabling Rust applications to interact with Subversion repositories and working copies.

§Overview

The subversion crate provides bindings to Subversion’s functionality through several modules, each corresponding to a major component of the Subversion API:

  • client - High-level client operations (checkout, commit, update, diff, merge, etc.)
  • wc - Working copy management and status operations
  • ra - Repository access layer for network operations
  • repos - Repository administration (create, load, dump, verify)
  • fs - Filesystem layer for direct repository access
  • delta - Editor interface for efficient tree transformations

§Features

Enable specific functionality via Cargo features:

  • client - Client operations
  • wc - Working copy management
  • ra - Repository access layer
  • delta - Delta/editor operations
  • repos - Repository administration
  • url - URL parsing utilities

Default features: ["ra", "wc", "client", "delta", "repos"]

§Error Handling

All operations return a Result<T, Error<'static>> where Error wraps Subversion’s error chain. Errors can be inspected for detailed information:

use subversion::client::Context;

let mut ctx = Context::new().unwrap();
match ctx.checkout("https://svn.example.com/repo", "/tmp/wc", None, true) {
    Ok(_) => println!("Checkout succeeded"),
    Err(e) => {
        eprintln!("Error: {}", e.full_message());
        eprintln!("At: {:?}", e.location());
    }
}

§Thread Safety

The Subversion libraries are not thread-safe. Each thread should have its own client::Context or other Subversion objects.

Re-exports§

pub use version::Version;
pub use repos::LoadUUID;
pub use repos::Notify;
pub use error::Error;

Modules§

auth
Authentication and credential management.
base64
Base64 encoding and decoding. Base64 encoding and decoding using Subversion’s base64 functions.
client
Subversion client operations. High-level Subversion client operations.
config
Configuration file handling.
conflict
Conflict resolution for working copy operations. Conflict resolution for working copy operations.
delta
Delta editor for tree modifications. Editor interface for efficient tree transformations.
diff
Diff generation and processing.
dirent
Directory entry operations.
error
Error handling types and utilities.
fs
Filesystem backend for repositories. Filesystem layer for direct repository access.
hash
Hash table utilities. Hash table serialization and utilities
init
Initialization utilities.
io
Input/output stream handling.
iter
Iterator utilities for Subversion data structures. Iterator utilities for APR data structures
merge
Merge operations for branches.
mergeinfo
Merge tracking information.
opt
Option parsing and command-line argument handling. Command-line option processing utilities
path
Path manipulation utilities for local paths and URLs. Path manipulation utilities for Subversion paths and URLs.
props
Property management for versioned items. Property handling utilities for Subversion.
ra
Repository access layer for remote operations. Repository Access (RA) layer for network operations.
repos
Repository administration and management. Repository administration and server-side operations.
string
String manipulation utilities.
subst
Keyword and EOL substitution. Keyword substitution and EOL translation
time
Time and date utilities.
uri
URI manipulation and validation.
version
Version information and compatibility checking.
wc
Working copy management and operations. Working copy management and status operations.

Structs§

Canonical
A canonicalized path or URL.
Checksum
A checksum value.
ChecksumContext
A context for computing checksums incrementally.
CommitInfo
Information about a committed revision.
DirEntry
Directory entry information from the repository.
DirentField
Flags indicating which fields are present in a directory entry.
InheritedItem
An inherited property item.
LocationSegment
A segment of a location in the repository history.
Lock
A lock on a path in the repository.
LogChangedPath
A changed path entry from a log entry.
LogEntry
A log entry from the repository history.
OwnedLogEntry
A log entry that owns its backing memory pool.
RevisionRange
A range of revisions.
Revnum
A Subversion revision number.

Enums§

ChecksumKind
The kind of checksum algorithm.
ClientConflictOptionId
Client conflict option ID that maps directly to svn_client_conflict_option_id_t
ConflictChoice
Legacy conflict choice enum for backward compatibility with WC functions
Depth
The depth of a Subversion operation.
FsPathChangeKind
The kind of change made to a path in the filesystem.
NativeEOL
Native end-of-line style.
NodeKind
The kind of a node in the repository.
NodeRelation
The relationship between two nodes in the filesystem.
Revision
A revision specification.
StatusKind
The status of a working copy item.
TextConflictChoice
Conflict resolution choice for text and property conflicts
TreeConflictChoice
Conflict resolution choice for tree conflicts

Functions§

as_bytes
Get the data from an svn_string_t as bytes
checksum
Computes a checksum for the given data.
svn_string_ncreate
Create a new svn_string_t from bytes
to_vec
Get the data from an svn_string_t as a Vec<u8>

Type Aliases§

FileSize
File size type.