Robust Versioning System - Git-style version control built for universal compatibility
Project description
๐ RVS - Robust Versioning System
RVS (Robust Versioning System) brings Git-style version control to environments where traditional solutions fall short. Built entirely in Python, RVS trades execution speed for universal compatibility and deployment simplicity.
Built for Flexibility:
- โ Functions in isolated environments (containers, embedded systems, restricted networks)
- โ Zero dependency installation
- โ Predictable behavior across all Python-supported platforms
- โ Simplified deployment pipeline
Local-Centric Design: RVS concentrates on local repository management without remote connectivity features. This focused approach makes it ideal for:
- Offline development workflows
- Edge computing and IoT applications
- Educational and training environments
- Scenarios with network limitations or security constraints
- Personal project archiving and backup systems
๐ What's New in v2.1.1
Enhanced Worktree Support: Complete Git-compatible worktree implementation
- Full worktree lifecycle management (add, list, remove, lock/unlock)
- Git-compatible
.rvsfile structure for seamless interoperability - Independent HEAD, index, and working directory per worktree
Detached HEAD Operations: Comprehensive support for detached HEAD workflows
- Checkout commits directly with
--detachoption - Create branches from detached HEAD state
- Proper status display and commit operations in detached mode
New Git Commands: Extended command set for better Git compatibility
rvs show- Display commit information with multiple output formatsrvs diff-tree- Compare tree objects between commitsrvs reset- Reset HEAD, index, and working tree with--soft,--mixed,--hardmodes
Improved Reliability: Enhanced error handling and cross-platform compatibility
- Better path normalization for Windows/Linux/macOS
- Robust index state management
- Improved uncommitted changes detection
โจ Features
- ๐ง Complete Git-like Interface - Familiar commands and workflows
- ๐ Self-Contained Architecture - Zero external dependencies required
- ๐ฆ Universal Installation - Install via pip or run directly on any Python platform
- ๐ณ Full Branching Support - Create, switch, and merge branches with detached HEAD support
- ๐ Staging Area - Add and commit changes with precision
- ๐ Commit History - View and navigate project history
- ๐ Advanced Operations - Rebase, stash, comprehensive worktree management
- ๐ข Multi-Worktree Support - Git-compatible worktree functionality for parallel development
- ๐ฏ Detached HEAD Operations - Full support for detached HEAD workflows
- ๐ ๏ธ Extensible Architecture - Clean, modular codebase
- ๐ฏ Local-First Design - Focused on local operations without remote dependencies
๐ Quick Start
Installation
From PyPI (Recommended)
# Install from PyPI
pip install rvs
From Source
# Clone the repository
git clone https://github.com/rvs-rvs/rvs.git
cd rvs
# Install using pip
pip install .
# Or install in development mode
pip install -e .
Basic Usage
# Initialize a new repository
rvs init
# Add files to staging area
rvs add file.txt
rvs add .
# Create a commit
rvs commit -m "Initial commit"
# Check repository status
rvs status
# View commit history
rvs log
๐ Available Commands
RVS supports all essential local Git operations:
| Command | Description | Example |
|---|---|---|
init |
Initialize a new repository | rvs init |
add |
Add files to staging area | rvs add file.txt |
commit |
Create a commit | rvs commit -m "message" |
status |
Show repository status | rvs status |
log |
Show commit history | rvs log |
show |
Display commit information | rvs show HEAD --name-status |
diff-tree |
Compare tree objects | rvs diff-tree --name-status -r HEAD |
reset |
Reset HEAD, index, and working tree | rvs reset --hard HEAD~1 |
branch |
List or create branches | rvs branch feature |
checkout |
Switch branches or restore files | rvs checkout main |
merge |
Join development histories | rvs merge feature |
rebase |
Reapply commits on another base | rvs rebase main |
restore |
Restore working tree files | rvs restore file.txt |
rm |
Remove files from index/working tree | rvs rm file.txt |
ls-files |
Show files in index and working tree | rvs ls-files |
ls-tree |
List contents of tree objects | rvs ls-tree HEAD |
worktree |
Manage multiple working trees | rvs worktree add ../feature |
stash |
Stash changes temporarily | rvs stash |
๐ก Usage Examples
Basic Workflow
# Start a new project
mkdir my-project && cd my-project
rvs init
# Add some files
echo "Hello World" > hello.txt
rvs add hello.txt
rvs commit -m "Add hello.txt"
# Create and switch to a new branch
rvs branch feature
rvs checkout feature
# Make changes and commit
echo "Feature code" > feature.txt
rvs add feature.txt
rvs commit -m "Add feature"
# Switch back and merge
rvs checkout main
rvs merge feature
Advanced Operations
# Stash uncommitted changes
rvs stash
# Work with multiple worktrees
rvs worktree add ../hotfix hotfix-branch
rvs worktree list
rvs worktree remove ../hotfix
# Detached HEAD operations
rvs checkout --detach HEAD~2
rvs checkout -b new-feature # Create branch from detached HEAD
# Reset operations
rvs reset --soft HEAD~1 # Reset HEAD only
rvs reset --mixed HEAD~1 # Reset HEAD and index (default)
rvs reset --hard HEAD~1 # Reset HEAD, index, and working tree
# Interactive rebase (reapply commits)
rvs rebase main
# Show commit details
rvs show HEAD --name-status # Show files changed in commit
rvs show HEAD --stat # Show diffstat
# Restore specific files from a commit
rvs restore --source=HEAD~1 file.txt
Repository Management
# Check what's staged and unstaged
rvs status
# View detailed commit history
rvs log --oneline
# List all files tracked by RVS
rvs ls-files
# Examine tree structure
rvs ls-tree HEAD
๐ข Worktree Management
RVS provides comprehensive Git-compatible worktree functionality, allowing you to work on multiple branches simultaneously:
Creating and Managing Worktrees
# Create a new worktree for a feature branch
rvs worktree add ../feature-branch feature
# Create a worktree in detached HEAD state
rvs worktree add ../hotfix HEAD~2
# List all worktrees
rvs worktree list
# Output:
# /path/to/main/repo abc1234 [main]
# /path/to/feature def5678 [feature]
# /path/to/hotfix ghi9012 (detached HEAD)
# Remove a worktree
rvs worktree remove ../feature-branch
# Lock/unlock worktrees
rvs worktree lock ../feature-branch
rvs worktree unlock ../feature-branch
Worktree Benefits
- Parallel Development: Work on multiple features simultaneously
- Git Compatibility: Uses the same
.rvsfile structure as Git worktrees - Independent State: Each worktree has its own HEAD, index, and working directory
- Shared History: All worktrees share the same commit history and branches
- Detached HEAD Support: Create worktrees in detached HEAD state for experimental work
Detached HEAD Workflows
RVS fully supports detached HEAD operations for experimental development:
# Enter detached HEAD state
rvs checkout --detach HEAD~3
# Make experimental changes
echo "experimental feature" > experiment.txt
rvs add experiment.txt
rvs commit -m "Experimental feature"
# Create a branch from detached HEAD
rvs checkout -b experiment-branch
# Or return to a branch, leaving experimental commits
rvs checkout main
๐ง Architecture
RVS is built with a robust, modular architecture designed for reliability and portability:
rvs/
โโโ core/ # Core functionality
โ โโโ repository.py # Repository management
โ โโโ objects.py # Git object handling
โ โโโ index.py # Staging area
โ โโโ refs.py # Branch/tag references
โ โโโ hooks.py # Hook system
โโโ commands/ # Command implementations
โ โโโ add.py # Add command
โ โโโ commit.py # Commit command
โ โโโ branch.py # Branch operations
โ โโโ ... # Other commands
โโโ cli.py # Command-line interface
โโโ exceptions.py # Custom exceptions
๐ง Command Line Options
usage: rvs [-h] [--repo REPO] [--version] {command} ...
RVS - Robust Versioning System
positional arguments:
{init,add,commit,status,log,show,diff-tree,reset,branch,checkout,merge,rebase,restore,rm,ls-files,ls-tree,worktree,stash}
Available commands
options:
-h, --help Show help message and exit
--repo REPO Repository path (default: current directory)
--version Show program's version number and exit
๐ค Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
# Clone the repository
git clone https://github.com/rvs-rvs/rvs.git
cd rvs
# Install in development mode
pip install -e .
# Run tests (if available)
python -m pytest
# Run RVS directly
python -m rvs --help
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Inspired by Git's elegant design and powerful functionality
- Built with Python's excellent standard library
- Thanks to the open-source community for inspiration and feedback
๐ Contact
- Project: rvs-rvs/rvs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
โญ Star this repository if you find it useful! โญ
Made with โค๏ธ for robust, portable version control
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rvs-2.1.1.tar.gz.
File metadata
- Download URL: rvs-2.1.1.tar.gz
- Upload date:
- Size: 56.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
227c5b68dddca4f4c44b45c1b90a9e7385705b543c60367dc3c3743219b139f6
|
|
| MD5 |
c8d19b02d1503dddc2dd1ba4a259cd77
|
|
| BLAKE2b-256 |
4b174d10feae6f3b3a6835ea61b10b2c9cb56d0c4e2112eb728f274dfe07749e
|
Provenance
The following attestation bundles were made for rvs-2.1.1.tar.gz:
Publisher:
publish-to-pypi.yml on rvs-rvs/rvs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rvs-2.1.1.tar.gz -
Subject digest:
227c5b68dddca4f4c44b45c1b90a9e7385705b543c60367dc3c3743219b139f6 - Sigstore transparency entry: 421084522
- Sigstore integration time:
-
Permalink:
rvs-rvs/rvs@f36cc6a0f6df6eb183d2e1e920b600f77692ec42 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/rvs-rvs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f36cc6a0f6df6eb183d2e1e920b600f77692ec42 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rvs-2.1.1-py3-none-any.whl.
File metadata
- Download URL: rvs-2.1.1-py3-none-any.whl
- Upload date:
- Size: 71.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dc1fcf88852e51d1b88ac5eeec9c4ad80b3d5f581024981712bdd2b34ac3716
|
|
| MD5 |
c8c3eb55107562c8466c103a92086ce6
|
|
| BLAKE2b-256 |
f8e771ed761a110a9296b89fd215ab879112f4aeacebb3ba3e22d5958806b3d0
|
Provenance
The following attestation bundles were made for rvs-2.1.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on rvs-rvs/rvs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rvs-2.1.1-py3-none-any.whl -
Subject digest:
2dc1fcf88852e51d1b88ac5eeec9c4ad80b3d5f581024981712bdd2b34ac3716 - Sigstore transparency entry: 421084540
- Sigstore integration time:
-
Permalink:
rvs-rvs/rvs@f36cc6a0f6df6eb183d2e1e920b600f77692ec42 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/rvs-rvs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f36cc6a0f6df6eb183d2e1e920b600f77692ec42 -
Trigger Event:
release
-
Statement type: