Crates.io | cargo-vcs |
lib.rs | cargo-vcs |
version | |
source | src |
created_at | 2022-07-18 00:11:18.503189 |
updated_at | 2024-11-30 00:12:41.659373 |
description | Cargo workspace helper for Version Control System project management |
homepage | |
repository | https://codeberg.org/almindor/cargo-vcs |
max_upload_size | |
id | 627422 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Cargo-vcs is a Cargo extension that adds version control helpers to help manage workspace members.
cargo vcs status
- for brief overviewcargo vcs status -v
- for verbose view$ cargo vcs status
Workspace is set to profile: new [.../rust/embedded] MSRV: 1.59.0
** Projects with uncommitted changes **
redv: refs/heads/e-h-1.0.0-alpha.7 [.../rust/embedded/apps/redv]
└── [CHANGES]
└── src/main.rs
e310x-hal: refs/heads/e-h-1.0.0-alpha.7 [.../rust/embedded/e310/e310x-hal]
└── [CHANGES]
├── src/spi/bus.rs
└── src/spi/config.rs
cargo vcs checkout master
- switch to master on all workspace memberscargo vcs checkout master -m member1, member2
- switch on specific members only$ cargo vcs checkout master
redv set to refs/heads/master
embedded-hal set to refs/heads/master
e310x set to refs/heads/master
e310x-hal set to refs/heads/master
hifive1 set to refs/heads/master
riscv set to refs/heads/master
riscv-rt set to refs/heads/master
mipidsi set to refs/heads/master
cargo vcs profile save profile1
- saves current repo state of each workspace member under the name profile1
cargo vcs profile set profile1
- switches all workspace member repositories to state saved in profile1
$ cargo vcs profile set new
redv set to refs/heads/e-h-1.0.0-alpha.7
embedded-hal set to refs/tags/v1.0.0-alpha.7
e310x set to refs/heads/e-h-1.0.0-alpha.7
e310x-hal set to refs/heads/e-h-1.0.0-alpha.7
hifive1 set to refs/heads/v0.11.0-alpha.1
riscv set to refs/heads/e-h-1.0.0-alpha.7
riscv-rt set to refs/heads/e-h-1.0.0-alpha.7
mipidsi set to refs/heads/v0.3.0-alpha.1
$ cd $(cargo vcs dir member1)
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 repository reference paths.
Toml file with the format of
[vcs.<profile_name>]
<project_name> = "<git_reference>"
...
Git is currently the only supported VCS.
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.
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.
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.
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.