about summary refs log tree commit diff
path: root/src/librustpkg/source_control.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-27 23:37:25 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-30 23:21:19 -0700
commitda24c0d32f8a5ce74268f416bbdab2e61a34976d (patch)
tree36c85c9b08089f91c87aa48927215f12c73de58a /src/librustpkg/source_control.rs
parenta7f19f36be81cfc04d013fec80598193638fe55b (diff)
downloadrust-da24c0d32f8a5ce74268f416bbdab2e61a34976d.tar.gz
rust-da24c0d32f8a5ce74268f416bbdab2e61a34976d.zip
rustpkg: Remove uses of fmt!
Diffstat (limited to 'src/librustpkg/source_control.rs')
-rw-r--r--src/librustpkg/source_control.rs33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/librustpkg/source_control.rs b/src/librustpkg/source_control.rs
index 92b749f2787..3d03d89bc20 100644
--- a/src/librustpkg/source_control.rs
+++ b/src/librustpkg/source_control.rs
@@ -19,26 +19,26 @@ pub fn git_clone(source: &Path, target: &Path, v: &Version) {
     assert!(os::path_is_dir(source));
     assert!(is_git_dir(source));
     if !os::path_exists(target) {
-        debug!("Running: git clone %s %s", source.to_str(), target.to_str());
+        debug2!("Running: git clone {} {}", source.to_str(), target.to_str());
         let outp = run::process_output("git", [~"clone", source.to_str(), target.to_str()]);
         if outp.status != 0 {
             io::println(str::from_utf8_owned(outp.output.clone()));
             io::println(str::from_utf8_owned(outp.error));
-            fail!("Couldn't `git clone` %s", source.to_str());
+            fail2!("Couldn't `git clone` {}", source.to_str());
         }
         else {
             match v {
                 &ExactRevision(ref s) => {
-                    debug!("`Running: git --work-tree=%s --git-dir=%s checkout %s",
+                    debug2!("`Running: git --work-tree={} --git-dir={} checkout {}",
                            *s, target.to_str(), target.push(".git").to_str());
                     let outp = run::process_output("git",
-                                   [fmt!("--work-tree=%s", target.to_str()),
-                                    fmt!("--git-dir=%s", target.push(".git").to_str()),
-                                    ~"checkout", fmt!("%s", *s)]);
+                                   [format!("--work-tree={}", target.to_str()),
+                                    format!("--git-dir={}", target.push(".git").to_str()),
+                                    ~"checkout", format!("{}", *s)]);
                     if outp.status != 0 {
                         io::println(str::from_utf8_owned(outp.output.clone()));
                         io::println(str::from_utf8_owned(outp.error));
-                        fail!("Couldn't `git checkout %s` in %s",
+                        fail2!("Couldn't `git checkout {}` in {}",
                               *s, target.to_str());
                     }
                 }
@@ -50,11 +50,12 @@ pub fn git_clone(source: &Path, target: &Path, v: &Version) {
         // Check that no version was specified. There's no reason to not handle the
         // case where a version was requested, but I haven't implemented it.
         assert!(*v == NoVersion);
-        debug!("Running: git --work-tree=%s --git-dir=%s pull --no-edit %s",
+        debug2!("Running: git --work-tree={} --git-dir={} pull --no-edit {}",
                target.to_str(), target.push(".git").to_str(), source.to_str());
-        let outp = run::process_output("git", [fmt!("--work-tree=%s", target.to_str()),
-                                               fmt!("--git-dir=%s", target.push(".git").to_str()),
-                                               ~"pull", ~"--no-edit", source.to_str()]);
+        let args = [format!("--work-tree={}", target.to_str()),
+                    format!("--git-dir={}", target.push(".git").to_str()),
+                    ~"pull", ~"--no-edit", source.to_str()];
+        let outp = run::process_output("git", args);
         assert!(outp.status == 0);
     }
 }
@@ -64,18 +65,18 @@ pub fn git_clone(source: &Path, target: &Path, v: &Version) {
 pub fn git_clone_general(source: &str, target: &Path, v: &Version) -> bool {
     let outp = run::process_output("git", [~"clone", source.to_str(), target.to_str()]);
     if outp.status != 0 {
-         debug!(str::from_utf8_owned(outp.output.clone()));
-         debug!(str::from_utf8_owned(outp.error));
+         debug2!("{}", str::from_utf8_owned(outp.output.clone()));
+         debug2!("{}", str::from_utf8_owned(outp.error));
          false
     }
     else {
         match v {
             &ExactRevision(ref s) | &Tagged(ref s) => {
-                    let outp = process_output_in_cwd("git", [~"checkout", fmt!("%s", *s)],
+                    let outp = process_output_in_cwd("git", [~"checkout", format!("{}", *s)],
                                                          target);
                     if outp.status != 0 {
-                        debug!(str::from_utf8_owned(outp.output.clone()));
-                        debug!(str::from_utf8_owned(outp.error));
+                        debug2!("{}", str::from_utf8_owned(outp.output.clone()));
+                        debug2!("{}", str::from_utf8_owned(outp.error));
                         false
                     }
                     else {