mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Auto merge of #7989 - ehuss:git-submodule-updating, r=alexcrichton
Add "Updating" status for git submodules. This adds a status message when updating a git submodule. Downloading these can be very slow (often submodules are much larger than their parents). I think it is helpful to provide some more feedback as to what it is doing.
This commit is contained in:
commit
b9b30c8b8e
@ -392,6 +392,9 @@ impl<'a> GitCheckout<'a> {
|
|||||||
};
|
};
|
||||||
// Fetch data from origin and reset to the head commit
|
// Fetch data from origin and reset to the head commit
|
||||||
let refspec = "refs/heads/*:refs/heads/*";
|
let refspec = "refs/heads/*:refs/heads/*";
|
||||||
|
cargo_config
|
||||||
|
.shell()
|
||||||
|
.status("Updating", format!("git submodule `{}`", url))?;
|
||||||
fetch(&mut repo, url, refspec, cargo_config).chain_err(|| {
|
fetch(&mut repo, url, refspec, cargo_config).chain_err(|| {
|
||||||
format!(
|
format!(
|
||||||
"failed to fetch submodule `{}` from {}",
|
"failed to fetch submodule `{}` from {}",
|
||||||
|
@ -878,6 +878,7 @@ fn dep_with_submodule() {
|
|||||||
.with_stderr(
|
.with_stderr(
|
||||||
"\
|
"\
|
||||||
[UPDATING] git repository [..]
|
[UPDATING] git repository [..]
|
||||||
|
[UPDATING] git submodule `file://[..]/dep2`
|
||||||
[COMPILING] dep1 [..]
|
[COMPILING] dep1 [..]
|
||||||
[COMPILING] foo [..]
|
[COMPILING] foo [..]
|
||||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]\n",
|
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]\n",
|
||||||
@ -941,6 +942,7 @@ fn dep_with_bad_submodule() {
|
|||||||
let expected = format!(
|
let expected = format!(
|
||||||
"\
|
"\
|
||||||
[UPDATING] git repository [..]
|
[UPDATING] git repository [..]
|
||||||
|
[UPDATING] git submodule `file://[..]/dep2`
|
||||||
[ERROR] failed to get `dep1` as a dependency of package `foo v0.5.0 [..]`
|
[ERROR] failed to get `dep1` as a dependency of package `foo v0.5.0 [..]`
|
||||||
|
|
||||||
Caused by:
|
Caused by:
|
||||||
@ -1182,6 +1184,7 @@ fn dep_with_changed_submodule() {
|
|||||||
p.cargo("run")
|
p.cargo("run")
|
||||||
.with_stderr(
|
.with_stderr(
|
||||||
"[UPDATING] git repository `[..]`\n\
|
"[UPDATING] git repository `[..]`\n\
|
||||||
|
[UPDATING] git submodule `file://[..]/dep2`\n\
|
||||||
[COMPILING] dep1 v0.5.0 ([..])\n\
|
[COMPILING] dep1 v0.5.0 ([..])\n\
|
||||||
[COMPILING] foo v0.5.0 ([..])\n\
|
[COMPILING] foo v0.5.0 ([..])\n\
|
||||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in \
|
[FINISHED] dev [unoptimized + debuginfo] target(s) in \
|
||||||
@ -1229,6 +1232,7 @@ fn dep_with_changed_submodule() {
|
|||||||
.with_stderr("")
|
.with_stderr("")
|
||||||
.with_stderr(&format!(
|
.with_stderr(&format!(
|
||||||
"[UPDATING] git repository `{}`\n\
|
"[UPDATING] git repository `{}`\n\
|
||||||
|
[UPDATING] git submodule `file://[..]/dep3`\n\
|
||||||
[UPDATING] dep1 v0.5.0 ([..]) -> #[..]\n\
|
[UPDATING] dep1 v0.5.0 ([..]) -> #[..]\n\
|
||||||
",
|
",
|
||||||
git_project.url()
|
git_project.url()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user