Cargo Version Control System helper for workspace management.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aleš Katona f04b767a4d
fix uncommited line output
2 years ago
src fix uncommited line output 2 years ago
.gitignore initial commit 2 years ago
CHANGELOG.md start refactoring `branch` subcommand into `checkout` 2 years ago
Cargo.lock bump version to v0.2 2 years ago
Cargo.toml bump version to v0.2 2 years ago
LICENSE initial commit 2 years ago
README.md add early release warning 2 years ago

README.md

Cargo Version Control System extension

Cargo-vcs is a Cargo extension that adds version control helpers to help manage workspace projects.

Example use cases

View current branch and MSRV status for workspace projects

  • cargo vcs status - for brief overview
  • cargo vcs status -v - for verbose view

Switch to a branch on all workspace projects

  • cargo vcs branch set master

Save currently set workspace branches as a profile

  • cargo vcs profile save profile1

Switch to a previously saved workspace profile

  • cargo vcs profile set profile1

Profile configs

Profile config is saved in the workspace root directory under the name Cargo_vcs.toml. Manual editing is possible but using cargo vcs profile save <profile_name> is the preferred method as it resolves shortnames to full ref paths.

Profile format

Toml file with the format of

[vcs.<profile_name>]
<project_name> = "<git_reference>"
...

VCS support

Git

Git is currently the only supported VCS.

Uncommitted changes

Profile and branch switching with uncommitted changes result in new stash pushes. Stashed changes are popped back when returning to the source reference or profile.

Each stash change is saved under a specific name and looked up as such, FIFO is not used and stash changes created outside of cargo-vcs are not considered.

Others

Currently only git is supported. Other version control systems can be added by implementing the Repository trait, however some more work is required in regards to the dirty changes strategy.

Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.59.0 and up. It might compile with older versions but that may change in any new patch release.

Early release

This project is still in early release phases. It should be safe to use but there's always a possibility of bugs which could result in workspace repositories ending up in an odd state.