r? @graydon Package IDs can now be of the form a/b/c#FOO, where (if a/b/c is
a git repository) FOO is any tag in the repository. Non-numeric
tags only match against package IDs with the same tag, and aren't
compared linearly like numeric versions.
While I was at it, refactored the code that calls `git clone`, and segregated build output properly for different packages.
}
}
+ fn git_repo_pkg_with_tag(a_tag: ~str) -> PkgId {
+ let remote = RemotePath(Path("mockgithub.com/catamorphism/test-pkg"));
+ PkgId {
+ local_path: normalize(remote.clone()),
+ remote_path: remote,
+ short_name: ~"test_pkg",
+ version: Tagged(a_tag)
+ }
+ }
+
fn writeFile(file_path: &Path, contents: &str) {
- let out: @io::Writer =
- result::unwrap(io::file_writer(file_path,
- [io::Create, io::Truncate]));
+ let out = io::file_writer(file_path, [io::Create, io::Truncate]).unwrap();
out.write_line(contents);
}