Ensure manifest paths are absolute paths

Closes #299
auto merge of #303 : alexcrichton/cargo/issue-299, r=wycats

Closes #299
Deal with different encodings of Cargo.lock

On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
auto merge of #314 : alexcrichton/cargo/hurray-for-windows, r=wycats

On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
Register new snapshots

These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
auto merge of #309 : alexcrichton/cargo/snapshots, r=wycats

These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
Use same method to load manifest with doc sub-command
Allow documenting binary targets.

This removes the check in the compilation phase, but adds an error if you're
documenting a library and a binary with the same name (as the rustdoc output
would conflict).
Ignore Cargo.lock for libs in `cargo-new`

The lockfile should only be checked in for bins, not libs.

Closes #304
auto merge of #317 : jdeseno/cargo/doc-manifest-path, r=alexcrichton
Update the lockfile when deps are modified

Closes #314
auto merge of #323 : alexcrichton/cargo/issue-314, r=wycats

Closes #314
Fix running tests using git on systems with customized git templates

I customized my git repo template to default to the standard pre-commit
hook that checks for e.g. trailing whitespace and refuses to commit if
any trailing whitespace was found. This causes some of cargo's tests to
fail.

To be independent of the user's git template, create the repo for the
test without using any, by specifying an empty template.
auto merge of #325 : dotdash/cargo/git_no_template, r=alexcrichton

I customized my git repo template to default to the standard pre-commit
hook that checks for e.g. trailing whitespace and refuses to commit if
any trailing whitespace was found. This causes some of cargo's tests to
fail.

To be independent of the user's git template, create the repo for the
test without using any, by specifying an empty template.
Refactor cargo_test into an ops module

The logic for doc tests will get a little complex, so this is moved to aseparate
module instead of inside the executable.
Implement doc tests

Whenever `cargo test` is run and a testable library target is available, the doc
tests will be run. This can be opted out of with `test = false` as usual.

This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to `extern crate foo`
explicitly.
Lift the requirement that cargo is built with make

Cargo should be able to build with cargo so others can depend on the cargo
library. This means that the one requirement of the CFG_VERSION env var will not
be available. This alters `version()` to prioritize CFG_VERSION but fall back to
the cargo-specified variables.
Fix submodules on the initial checkout

The fast path bypassed updating the submodule which wasn't correct if we were
the first checkout.
Fix the output type of `staticlib`

The file-naming bits weren't handling the staticlib case
auto merge of #319 : alexcrichton/cargo/fix-staticlibs, r=wycats

The file-naming bits weren't handling the staticlib case