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 operationsra- Repository access layer for network operationsrepos- Repository administration (create, load, dump, verify)fs- Filesystem layer for direct repository accessdelta- Editor interface for efficient tree transformations
§Features
Enable specific functionality via Cargo features:
client- Client operationswc- Working copy managementra- Repository access layerdelta- Delta/editor operationsrepos- Repository administrationurl- 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§
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.
- Checksum
Context - A context for computing checksums incrementally.
- Commit
Info - Information about a committed revision.
- DirEntry
- Directory entry information from the repository.
- Dirent
Field - Flags indicating which fields are present in a directory entry.
- Inherited
Item - An inherited property item.
- Location
Segment - A segment of a location in the repository history.
- Lock
- A lock on a path in the repository.
- LogChanged
Path - A changed path entry from a log entry.
- LogEntry
- A log entry from the repository history.
- Owned
LogEntry - A log entry that owns its backing memory pool.
- Revision
Range - A range of revisions.
- Revnum
- A Subversion revision number.
Enums§
- Checksum
Kind - The kind of checksum algorithm.
- Client
Conflict Option Id - Client conflict option ID that maps directly to svn_client_conflict_option_id_t
- Conflict
Choice - Legacy conflict choice enum for backward compatibility with WC functions
- Depth
- The depth of a Subversion operation.
- FsPath
Change Kind - The kind of change made to a path in the filesystem.
- NativeEOL
- Native end-of-line style.
- Node
Kind - The kind of a node in the repository.
- Node
Relation - The relationship between two nodes in the filesystem.
- Revision
- A revision specification.
- Status
Kind - The status of a working copy item.
- Text
Conflict Choice - Conflict resolution choice for text and property conflicts
- Tree
Conflict Choice - 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§
- File
Size - File size type.