]> git.proxmox.com Git - cargo.git/commit
Move from all-URL to Path/URL enum
authorAlex Crichton <alex@alexcrichton.com>
Wed, 25 Jun 2014 05:02:21 +0000 (22:02 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 25 Jun 2014 18:12:56 +0000 (11:12 -0700)
commit1a7a48844c783c9c517ac57ba48f90159c01c3f8
tree65552d8be0cf1d569bab1c7f61615585fb8864b7
parentdf3b3c0b3462ffbed0b3dc7baa09bf32549ccc57
Move from all-URL to Path/URL enum

On windows a path cannot be represented as a file:// URL because of the
backslashes and colons in the file name. This causes all of the tests which rely
on git to fail on windows. This commit changes the representation of the
location of a package to be an enum, Location, with two variants: Remote and
Local.

When parsing Cargo.toml, all locations which begin with the string "file:" have
that prefix stripped and are then interpreted as Local packages. Everything else
is parsed as a URL and used as a Remote package.
src/cargo/core/package.rs
src/cargo/core/package_id.rs
src/cargo/core/resolver.rs
src/cargo/core/source.rs
src/cargo/sources/git/source.rs
src/cargo/sources/git/utils.rs
src/cargo/util/toml.rs