<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *unreleased*
 
+* Make deploy:upload use the upload() helper for more efficient directory processing [Jamis Buck]
+
 * Make deploy:upload accept globs [Mark Imbriaco]
 
 * Make sure the host is reported with the output from scm_run [Jamis Buck]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -233,24 +233,19 @@ namespace :deploy do
     To use this task, specify the files and directories you want to copy as a \
     comma-delimited list in the FILES environment variable. All directories \
     will be processed recursively, with all files being pushed to the \
-    deployment servers. Any file or directory starting with a '.' character \
-    will be ignored.
+    deployment servers.
 
       $ cap deploy:upload FILES=templates,controller.rb
+
+    Dir globs are also supported:
+
+      $ cap deploy:upload FILES='config/apache/*.conf'
   DESC
   task :upload, :except =&gt; { :no_release =&gt; true } do
-    files = (ENV[&quot;FILES&quot;] || &quot;&quot;).
-      split(&quot;,&quot;).
-      map { |f| f.strip!; Dir[ File.directory?(f) ? &quot;#{f}/**/*&quot; : f ]}.
-      flatten.
-      reject { |f| File.directory?(f) || File.basename(f)[0] == ?. }
+    files = (ENV[&quot;FILES&quot;] || &quot;&quot;).split(&quot;,&quot;).map { |f| Dir[f.strip] }.flatten
+    abort &quot;Please specify at least one file or directory to update (via the FILES environment variable)&quot; if files.empty?
 
-    abort &quot;Please specify at least one file to update (via the FILES environment variable)&quot; if files.empty?
-
-    files.each do |file|
-      content = File.open(file, &quot;rb&quot;) { |f| f.read }
-      put content, File.join(current_path, file)
-    end
+    files.each { |file| top.upload(file, File.join(current_path, file)) }
   end
 
   desc &lt;&lt;-DESC</diff>
      <filename>lib/capistrano/recipes/deploy.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7b417973a9c21634f79b4abf91572d9e35783e79</id>
    </parent>
  </parents>
  <author>
    <name>Jamis Buck</name>
    <email>jamis@37signals.com</email>
  </author>
  <url>http://github.com/jamis/capistrano/commit/919f868573c9e6a01d9e356fb5f222c5ed3600a7</url>
  <id>919f868573c9e6a01d9e356fb5f222c5ed3600a7</id>
  <committed-date>2008-06-05T17:40:44-07:00</committed-date>
  <authored-date>2008-06-05T17:40:44-07:00</authored-date>
  <message>Make deploy:upload use the upload() helper for more efficient directory processing.</message>
  <tree>43450305d27ca58f1597203fb8a64950de47b59d</tree>
  <committer>
    <name>Jamis Buck</name>
    <email>jamis@37signals.com</email>
  </committer>
</commit>
