Update dependencies and Rust that's used
authorAlex Crichton <alex@alexcrichton.com>
Mon, 3 Aug 2015 17:04:22 +0000 (10:04 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 14 Aug 2015 20:30:53 +0000 (13:30 -0700)
* Picks up a few breaking changes to dependency APIs, notably the tar-rs changes
  and git2-rs changes.
* Builds should now work with VS 2015

15 files changed:
.travis.yml
Cargo.lock
Cargo.toml
appveyor.yml
src/cargo/ops/cargo_package.rs
src/cargo/sources/git/utils.rs
src/rustversion.txt
tests/support/git.rs
tests/support/registry.rs
tests/test_cargo_build_auth.rs
tests/test_cargo_compile.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_doc.rs
tests/test_cargo_package.rs
tests/test_cargo_publish.rs

index ac0abad5fadc2c4c2ac735da3efd09f4f6c2995c..318daa59b4435a626d8937e090d75f5fe8b0e038 100644 (file)
@@ -33,6 +33,9 @@ branches:
 
 addons:
   apt:
+    sources:
+      - kalakris-cmake
     packages:
-    - g++-multilib
-    - lib32stdc++6
+      - cmake
+      - g++-multilib
+      - lib32stdc++6
index 892faedac3bbb7592cadbc131ac9026d178edf17..f945f715dd483df288db96cc4cdf7548a6c3dcd0 100644 (file)
@@ -6,30 +6,30 @@ dependencies = [
  "bufstream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "crates-io 0.1.0",
  "curl 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.6.69 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.6.70 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "filetime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "flate2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2-curl 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2-curl 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "hamcrest 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "kernel32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "semver 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "tar 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "term 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "threadpool 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -37,13 +37,13 @@ name = "advapi32-sys"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "aho-corasick"
-version = "0.2.2"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "memchr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -59,12 +59,20 @@ name = "bufstream"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "cmake"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gcc 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "crates-io"
 version = "0.1.0"
 dependencies = [
  "curl 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -75,7 +83,7 @@ dependencies = [
  "curl-sys 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -84,20 +92,20 @@ name = "curl-sys"
 version = "0.1.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "docopt"
-version = "0.6.69"
+version = "0.6.70"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "regex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "strsim 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -107,7 +115,7 @@ version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -115,9 +123,9 @@ name = "filetime"
 version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "kernel32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -131,31 +139,31 @@ dependencies = [
 
 [[package]]
 name = "gcc"
-version = "0.3.10"
+version = "0.3.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "git2"
-version = "0.2.13"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "git2-curl"
-version = "0.2.4"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "curl 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -170,16 +178,16 @@ name = "hamcrest"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "num 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "kernel32-sys"
-version = "0.1.3"
+version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -189,44 +197,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libgit2-sys"
-version = "0.2.20"
+version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "cmake 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
- "libz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "libressl-pnacl-sys"
-version = "2.1.5"
+version = "2.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "pnacl-build-helper 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pnacl-build-helper 1.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "libssh2-sys"
-version = "0.1.27"
+version = "0.1.29"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cmake 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "libz-sys"
-version = "0.1.7"
+version = "0.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -255,17 +264,17 @@ name = "miniz-sys"
 version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "num"
-version = "0.1.25"
+version = "0.1.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -278,23 +287,23 @@ dependencies = [
 
 [[package]]
 name = "openssl-sys"
-version = "0.6.2"
+version = "0.6.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libressl-pnacl-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "pkg-config"
-version = "0.3.4"
+version = "0.3.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "pnacl-build-helper"
-version = "1.4.0"
+version = "1.4.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -302,35 +311,37 @@ dependencies = [
 
 [[package]]
 name = "rand"
-version = "0.3.8"
+version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex"
-version = "0.1.40"
+version = "0.1.41"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "aho-corasick 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "aho-corasick 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "memchr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex-syntax"
-version = "0.2.0"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "rustc-serialize"
-version = "0.3.14"
+version = "0.3.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "semver"
-version = "0.1.19"
+version = "0.1.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -340,9 +351,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tar"
-version = "0.2.14"
+version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "filetime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -351,7 +363,7 @@ name = "tempdir"
 version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -359,8 +371,8 @@ name = "term"
 version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "kernel32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -370,19 +382,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "time"
-version = "0.1.26"
+version = "0.1.32"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "toml"
-version = "0.1.21"
+version = "0.1.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -391,16 +404,16 @@ version = "0.2.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "winapi"
-version = "0.2.1"
+version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "winapi-build"
-version = "0.1.0"
+version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
index ca5a971cb1fe0fc75d635470db4d8c595d567ab9..16aacb34711400fe16a32eabd19d35d4ec11d48a 100644 (file)
@@ -23,19 +23,19 @@ docopt = "0.6"
 env_logger = "0.3"
 filetime = "0.1"
 flate2 = "0.2"
-git2 = "0.2"
-git2-curl = "0.2"
+git2 = "0.3"
+git2-curl = "0.3"
 glob = "0.2"
 kernel32-sys = "0.1"
 libc = "0.1"
-libgit2-sys = "0.2"
+libgit2-sys = "0.3"
 log = "0.3"
 num_cpus = "0.2"
 regex = "0.1"
 crates-io = { path = "src/crates-io", version = "0.1" }
 rustc-serialize = "0.3"
 semver = "0.1"
-tar = { version = "0.2", features = ["nightly"] }
+tar = "0.3"
 term = "0.2"
 threadpool = "0.1"
 time = "0.1"
index 5316552ab4c01a164601be79dedb028ce8617b40..18fc5f2fd5a9f72e676afc0c7bcc9af1d72f71a3 100644 (file)
@@ -24,7 +24,7 @@ install:
 build: false
 
 test_script:
-  - cargo test
+  - cargo test -- --nocapture
 
 branches:
   only:
index 7c6c04c1aa21686c38c9ffd516c17e45ac860c55..bcd74f460a7accf17c9312ce1113f34a00d5fcfe 100644 (file)
@@ -136,7 +136,7 @@ fn tar(pkg: &Package, src: &PathSource, config: &Config,
         }));
         let path = format!("{}-{}{}{}", pkg.name(), pkg.version(),
                            path::MAIN_SEPARATOR, relative);
-        try!(ar.append(&path, &mut file).chain_error(|| {
+        try!(ar.append_file(&path, &mut file).chain_error(|| {
             internal(format!("could not archive source file `{}`", relative))
         }));
     }
index c1d0b6068cd82ff455fcdf45f6af50ea0d235c8f..492bf9533b5be917b60ee8d352ba15420ba3162d 100644 (file)
@@ -112,13 +112,13 @@ impl GitRemote {
         let repo = match git2::Repository::open(into) {
             Ok(repo) => {
                 try!(self.fetch_into(&repo).chain_error(|| {
-                    internal(format!("failed to fetch into {}", into.display()))
+                    human(format!("failed to fetch into {}", into.display()))
                 }));
                 repo
             }
             Err(..) => {
                 try!(self.clone_into(into).chain_error(|| {
-                    internal(format!("failed to clone into: {}", into.display()))
+                    human(format!("failed to clone into: {}", into.display()))
                 }))
             }
         };
@@ -365,11 +365,21 @@ fn with_authentication<T, F>(url: &str, cfg: &git2::Config, mut f: F)
     //
     // * After the above two have failed, we just kinda grapple attempting to
     //   return *something*.
+    //
+    // Note that we keep track of the number of times we've called this callback
+    // because libgit2 will repeatedly give us credentials until we give it a
+    // reason to not do so. If we've been called once and our credentials failed
+    // then we'll be called again, and in this case we assume that the reason
+    // was because the credentials were wrong.
     let mut cred_helper = git2::CredentialHelper::new(url);
     cred_helper.config(cfg);
-    let mut cred_error = false;
-    let ret = f(&mut |url, username, allowed| {
-        let creds = if allowed.contains(git2::SSH_KEY) ||
+    let mut called = 0;
+    let res = f(&mut |url, username, allowed| {
+        called += 1;
+        if called >= 2 {
+            return Err(git2::Error::from_str("no authentication available"))
+        }
+        if allowed.contains(git2::SSH_KEY) ||
                        allowed.contains(git2::USERNAME) {
             let user = username.map(|s| s.to_string())
                                .or_else(|| cred_helper.username.clone())
@@ -385,16 +395,14 @@ fn with_authentication<T, F>(url: &str, cfg: &git2::Config, mut f: F)
             git2::Cred::default()
         } else {
             Err(git2::Error::from_str("no authentication available"))
-        };
-        cred_error = creds.is_err();
-        creds
+        }
     });
-    if cred_error {
-        ret.chain_error(|| {
-            human("Failed to authenticate when downloading repository")
+    if called > 0 {
+        res.chain_error(|| {
+            human("failed to authenticate when downloading repository")
         })
     } else {
-        ret
+        res
     }
 }
 
@@ -404,11 +412,12 @@ pub fn fetch(repo: &git2::Repository, url: &str,
 
     with_authentication(url, &try!(repo.config()), |f| {
         let mut cb = git2::RemoteCallbacks::new();
-        cb.credentials(|a, b, c| f(a, b, c));
-        let mut remote = try!(repo.remote_anonymous(&url, Some(refspec)));
-        try!(remote.add_fetch("refs/tags/*:refs/tags/*"));
-        remote.set_callbacks(cb);
-        try!(remote.fetch(&["refs/tags/*:refs/tags/*", refspec], None));
+        cb.credentials(f);
+        let mut remote = try!(repo.remote_anonymous(&url));
+        let mut opts = git2::FetchOptions::new();
+        opts.remote_callbacks(cb)
+            .download_tags(git2::AutotagOption::All);
+        try!(remote.fetch(&[refspec], Some(&mut opts), None));
         Ok(())
     })
 }
index 572b76a26e0d99cdee7588b4ff7b33dad8b55a2b..49b1509a7c4bcecdef4e3343a48881400b530cfc 100644 (file)
@@ -1 +1 @@
-2015-07-22
+2015-08-13
index 082f07fab6a072d738e50690971774c6c7171ed3..a84e5287dee527e1b76a0c631893b2275aecd97d 100644 (file)
@@ -97,10 +97,9 @@ pub fn add_submodule<'a>(repo: &'a git2::Repository, url: &str,
     let path = path.to_str().unwrap().replace(r"\", "/");
     let mut s = repo.submodule(url, Path::new(&path), false).unwrap();
     let subrepo = s.open().unwrap();
+    subrepo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*").unwrap();
     let mut origin = subrepo.find_remote("origin").unwrap();
-    origin.add_fetch("refs/heads/*:refs/heads/*").unwrap();
-    origin.fetch(&[], None).unwrap();
-    origin.save().unwrap();
+    origin.fetch(&[], None, None).unwrap();
     subrepo.checkout_head(None).unwrap();
     s.add_finalize().unwrap();
     return s;
index 583916fdb7e5cdaecef1e02a9fadc87ff177b817..861bc5a11dcd5d1548b47ed420b1cbb441046048 100644 (file)
@@ -62,10 +62,10 @@ pub fn mock_archive(name: &str, version: &str, deps: &[(&str, &str, &str)]) {
     fs::create_dir_all(dst.parent().unwrap()).unwrap();
     let f = File::create(&dst).unwrap();
     let a = Archive::new(GzEncoder::new(f, Default));
-    a.append(&format!("{}-{}/Cargo.toml", name, version),
-             &mut File::open(&p.root().join("Cargo.toml")).unwrap()).unwrap();
-    a.append(&format!("{}-{}/src/lib.rs", name, version),
-             &mut File::open(&p.root().join("src/lib.rs")).unwrap()).unwrap();
+    a.append_file(&format!("{}-{}/Cargo.toml", name, version),
+                  &mut File::open(&p.root().join("Cargo.toml")).unwrap()).unwrap();
+    a.append_file(&format!("{}-{}/src/lib.rs", name, version),
+                  &mut File::open(&p.root().join("src/lib.rs")).unwrap()).unwrap();
     a.finish().unwrap();
 }
 
index a8e88cbd19adbd514b06e63898c64b06c59bc088..9dcf1293ce81dace079a26babc271149d9437907 100644 (file)
@@ -40,7 +40,7 @@ test!(http_auth_offered {
         assert_eq!(req, vec![
             "GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1",
             "Accept: */*",
-            "User-Agent: git/1.0 (libgit2 0.22.0)",
+            "User-Agent: git/1.0 (libgit2 0.23.0)",
         ].into_iter().map(|s| s.to_string()).collect());
         drop(s);
 
@@ -55,7 +55,7 @@ test!(http_auth_offered {
             "GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1",
             "Authorization: Basic Zm9vOmJhcg==",
             "Accept: */*",
-            "User-Agent: git/1.0 (libgit2 0.22.0)",
+            "User-Agent: git/1.0 (libgit2 0.23.0)",
         ].into_iter().map(|s| s.to_string()).collect());
     });
 
@@ -93,7 +93,7 @@ test!(http_auth_offered {
         "#, addr.port()))
         .file("src/main.rs", "");
 
-    assert_that(p.cargo_process("build").arg("-v"),
+    assert_that(p.cargo_process("build"),
                 execs().with_status(101).with_stdout(&format!("\
 {updating} git repository `http://{addr}/foo/bar`
 ",
@@ -107,7 +107,9 @@ Caused by:
   failed to clone into: [..]
 
 Caused by:
-  [..] status code: 401
+  failed to authenticate when downloading repository
+
+To learn more, run the command again with --verbose.
 ",
         addr = addr)));
 
@@ -152,8 +154,9 @@ Caused by:
 ",
         addr = addr,
         errmsg = if cfg!(windows) {
-            "[[..]] failed to send request: The connection with the server \
-             was terminated abnormally\n"
+            "[[..]] failed to send request: [..]\n"
+        } else if cfg!(target_os = "macos") {
+            "[[..]] unexpected return value from ssl handshake [..]"
         } else {
             "[[..]] SSL error: [..]"
         })));
index b48445dbd447521c36c10c33c8daad0a69291519..ca147db349b0f4cfaecdd530229f8224b60ad23e 100644 (file)
@@ -1780,7 +1780,8 @@ test!(rustc_env_var {
 Could not execute process `rustc-that-does-not-exist -vV` ([..])
 
 Caused by:
-[..]".to_string() + if cfg!(windows) {"\n[..]\n"} else {"\n"}));
+[..]
+"));
     assert_that(&p.bin("a"), is_not(existing_file()));
 });
 
index 2f73a2f4e0a70689a622fd945de321dfbaa934b7..34d2e37f99f7f01e9900363c4621f5f217ede369 100644 (file)
@@ -921,11 +921,12 @@ test!(dep_with_changed_submodule {
     sub.sync().unwrap();
     {
         let subrepo = sub.open().unwrap();
+        subrepo.remote_add_fetch("origin",
+                                 "refs/heads/*:refs/heads/*").unwrap();
+        subrepo.remote_set_url("origin",
+                               &git_project3.url().to_string()).unwrap();
         let mut origin = subrepo.find_remote("origin").unwrap();
-        origin.set_url(&git_project3.url().to_string()).unwrap();
-        origin.add_fetch("refs/heads/*:refs/heads/*").unwrap();;
-        origin.fetch(&[], None).unwrap();
-        origin.save().unwrap();
+        origin.fetch(&[], None, None).unwrap();
         let id = subrepo.refname_to_id("refs/remotes/origin/master").unwrap();
         let obj = subrepo.find_object(id, None).unwrap();
         subrepo.reset(&obj, git2::ResetType::Hard, None).unwrap();
index 46be1eebaa170f770b8b44a756bdcbe2109c8279..7464e3774b97936df09f57ff7e463abafc498036 100644 (file)
@@ -266,6 +266,8 @@ test!(doc_same_name {
 test!(doc_target {
     const TARGET: &'static str = "arm-unknown-linux-gnueabihf";
 
+    if !::is_nightly() { return }
+
     let p = project("foo")
         .file("Cargo.toml", r#"
             [package]
@@ -274,8 +276,8 @@ test!(doc_target {
             authors = []
         "#)
         .file("src/lib.rs", r#"
-            #![feature(no_std)]
-            #![no_std]
+            #![feature(no_core)]
+            #![no_core]
 
             extern {
                 pub static A: u32;
index 43b21e2617bf0a6215bd722cf5e157837bd639c0..5ca6b1cf6321822c5e822a4a293613c513e40d3e 100644 (file)
@@ -57,10 +57,11 @@ src[..]main.rs
     let ar = Archive::new(Cursor::new(contents));
     for f in ar.files().unwrap() {
         let f = f.unwrap();
-        let fname = f.filename_bytes();
+        let fname = f.header().path_bytes();
+        let fname = &*fname;
         assert!(fname == b"foo-0.0.1/Cargo.toml" ||
                 fname == b"foo-0.0.1/src/main.rs",
-                "unexpected filename: {:?}", f.filename())
+                "unexpected filename: {:?}", f.header().path())
     }
 });
 
@@ -363,9 +364,10 @@ src[..]main.rs
     let ar = Archive::new(Cursor::new(contents));
     for f in ar.files().unwrap() {
         let f = f.unwrap();
-        let fname = f.filename_bytes();
+        let fname = f.header().path_bytes();
+        let fname = &*fname;
         assert!(fname == b"nested-0.0.1/Cargo.toml" ||
                 fname == b"nested-0.0.1/src/main.rs",
-                "unexpected filename: {:?}", f.filename())
+                "unexpected filename: {:?}", f.header().path())
     }
 });
index ada46bbc5f6d6667bc272ff8c40b9574266aa672..5e35c482a70a8d87d0218fde56a1efeb1528778f 100644 (file)
@@ -80,10 +80,11 @@ test!(simple {
     let ar = Archive::new(inner);
     for file in ar.files().unwrap() {
         let file = file.unwrap();
-        let fname = file.filename_bytes();
+        let fname = file.header().path_bytes();
+        let fname = &*fname;
         assert!(fname == b"foo-0.0.1/Cargo.toml" ||
                 fname == b"foo-0.0.1/src/main.rs",
-                "unexpected filename: {:?}", file.filename())
+                "unexpected filename: {:?}", file.header().path());
     }
 });