]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #8032 : catamorphism/rust/rustpkg-tags, r=graydon
authorbors <bors@rust-lang.org>
Mon, 29 Jul 2013 18:04:25 +0000 (11:04 -0700)
committerbors <bors@rust-lang.org>
Mon, 29 Jul 2013 18:04:25 +0000 (11:04 -0700)
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.

1  2 
src/librustpkg/tests.rs

index a203fccfb5f3c7520ff3dbff0a78bccc5193e54a,594298331b78499b32bf5d79cec6ae2f266b5235..5930d8e9043ccfefc2303d1ce7957ab505224d05
@@@ -61,8 -61,20 +61,18 @@@ fn git_repo_pkg() -> PkgId 
      }
  }
  
+ 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);
  }