<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *unreleased*
 
+* Make sure the host is reported with the output from scm_run [Jamis Buck]
+
 * Make git SCM honor the :scm_verbose option [Jamis Buck]
 
 * Don't follow symlinks when using :copy_cache [Jamis Buck]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -227,7 +227,8 @@ module Capistrano
         # from the SCM. Password prompts, connection requests, passphrases,
         # etc. are handled here.
         def handle_data(state, stream, text)
-          logger.info &quot;[#{stream}] #{text}&quot;
+          host = state[:channel][:host]
+          logger.info &quot;[#{host} :: #{stream}] #{text}&quot;
           case text
           when /\bpassword.*:/i
             # git is prompting for a password</diff>
      <filename>lib/capistrano/recipes/deploy/scm/git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,8 @@ module Capistrano
         # user/pass can come from ssh and http distribution methods
         # yes/no is for when ssh asks you about fingerprints
         def handle_data(state, stream, text)
-          logger.info &quot;[#{stream}] #{text}&quot;
+          host = state[:channel][:host]
+          logger.info &quot;[#{host} :: #{stream}] #{text}&quot;
           case text
           when /^user:/mi
             # support :scm_user for backwards compatibility of this module</diff>
      <filename>lib/capistrano/recipes/deploy/scm/mercurial.rb</filename>
    </modified>
    <modified>
      <diff>@@ -68,7 +68,8 @@ module Capistrano
         # from the SCM. Password prompts, connection requests, passphrases,
         # etc. are handled here.
         def handle_data(state, stream, text)
-	        logger.info &quot;[#{stream}] #{text}&quot;
+          host = state[:channel][:host]
+	        logger.info &quot;[#{host} :: #{stream}] #{text}&quot;
           case text
           when /\bpassword.*:/i
             # subversion is prompting for a password</diff>
      <filename>lib/capistrano/recipes/deploy/scm/subversion.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ module Capistrano
           # #handle_data filter of the SCM implementation.
           def scm_run(command)
             run(command) do |ch,stream,text|
-              ch[:state] ||= {}
+              ch[:state] ||= { :channel =&gt; ch }
               output = source.handle_data(ch[:state], stream, text)
               ch.send_data(output) if output
             end</diff>
      <filename>lib/capistrano/recipes/deploy/strategy/remote.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,10 +43,10 @@ class DeploySCMMercurialTest &lt; Test::Unit::TestCase
     require 'capistrano/logger'
     @config[:scm_user] = &quot;fred&quot;
     text = &quot;user:&quot;
-    assert_equal &quot;fred\n&quot;, @source.handle_data(:test_state, :test_stream, text)
+    assert_equal &quot;fred\n&quot;, @source.handle_data(mock_state, :test_stream, text)
     # :scm_username takes priority
     @config[:scm_username] = &quot;wilma&quot;
-    assert_equal &quot;wilma\n&quot;, @source.handle_data(:test_state, :test_stream, text)
+    assert_equal &quot;wilma\n&quot;, @source.handle_data(mock_state, :test_stream, text)
   end
 
   def test_sync
@@ -67,7 +67,7 @@ class DeploySCMMercurialTest &lt; Test::Unit::TestCase
     require 'capistrano/logger'
     text = &quot;password:&quot;
     @config[:scm_password] = &quot;opensesame&quot;
-    assert_equal &quot;opensesame\n&quot;, @source.handle_data(:test_state, :test_stream, text)
+    assert_equal &quot;opensesame\n&quot;, @source.handle_data(mock_state, :test_stream, text)
   end
   
   def test_prompts_for_password_if_preferred
@@ -76,7 +76,7 @@ class DeploySCMMercurialTest &lt; Test::Unit::TestCase
     Capistrano::CLI.stubs(:password_prompt).with(&quot;hg password: &quot;).returns(&quot;opensesame&quot;)
     @config[:scm_prefer_prompt] = true
     text = &quot;password:&quot;
-    assert_equal &quot;opensesame\n&quot;, @source.handle_data(:test_state, :test_stream, text)
+    assert_equal &quot;opensesame\n&quot;, @source.handle_data(mock_state, :test_stream, text)
   end
 
 
@@ -120,4 +120,10 @@ class DeploySCMMercurialTest &lt; Test::Unit::TestCase
     assert_equal &quot;hg&quot;, @source.local.command
     assert_equal &quot;/foo/bar/hg&quot;, @source.command
   end
+
+  private
+
+    def mock_state
+      { :channel =&gt; { :host =&gt; &quot;abc&quot; } }
+    end
 end</diff>
      <filename>test/deploy/scm/mercurial_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3d3156fd82c35719e70fdde8894d42cf7b7b3d5d</id>
    </parent>
  </parents>
  <author>
    <name>Jamis Buck</name>
    <email>jamis@37signals.com</email>
  </author>
  <url>http://github.com/jamis/capistrano/commit/d48ed9a9860980f924a392e3ba7bbe919253602c</url>
  <id>d48ed9a9860980f924a392e3ba7bbe919253602c</id>
  <committed-date>2008-05-31T09:03:29-07:00</committed-date>
  <authored-date>2008-05-31T09:03:29-07:00</authored-date>
  <message>report hostname with output of scm_run.

This should make it easier to troubleshoot issues that
crop up when running the scm_command via a deployment
strategy.</message>
  <tree>c8c7e0ee54a865540a7feab72a9cc8b00c847576</tree>
  <committer>
    <name>Jamis Buck</name>
    <email>jamis@37signals.com</email>
  </committer>
</commit>
