From: bors Date: Wed, 14 Jun 2017 03:33:46 +0000 (+0000) Subject: Auto merge of #4155 - ketralnis:fossil, r=alexcrichton X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~8^2~42 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e934177fca2cbe20fed853328c36c9d8d11d477c;p=cargo.git Auto merge of #4155 - ketralnis:fossil, r=alexcrichton Add fossil VCS support to `cargo new` Fossil is a simple, high-reliability, distributed software configuration management system I mostly followed https://github.com/rust-lang/cargo/pull/3842 as a template. Like that one, this only adds support for `cargo new`, not for pulling down fossil-hosted dependencies A problem that i didn't tackle but I'd be willing to is a little more more `trait`ifying of the VCSs. I would need some guidance on that since it looks like git has some more thorough support than e.g. hg does but it looks pretty doable --- e934177fca2cbe20fed853328c36c9d8d11d477c diff --cc src/cargo/ops/cargo_new.rs index 8cd4be224,b41aee94a..cd88e52a1 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@@ -50,11 -49,11 +50,12 @@@ impl<'de> Deserialize<'de> for VersionC "git" => VersionControl::Git, "hg" => VersionControl::Hg, "pijul" => VersionControl::Pijul, + "fossil" => VersionControl::Fossil, "none" => VersionControl::NoVcs, n => { - let err = format!("could not decode '{}' as version control", n); - return Err(d.error(&err)); + let value = de::Unexpected::Str(n); + let msg = "unsupported version control system"; + return Err(de::Error::invalid_value(value, &msg)); } }) }