[ARVADOS] updated: f3b393533d3d3a4ca6ae33b4bb3b42b4bc6c8bca

git at public.curoverse.com git at public.curoverse.com
Thu Nov 6 13:11:11 EST 2014


Summary of changes:
 services/api/script/crunch-dispatch.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

       via  f3b393533d3d3a4ca6ae33b4bb3b42b4bc6c8bca (commit)
      from  7d6454e0805ff043cd523aa67e6de10fe856d698 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f3b393533d3d3a4ca6ae33b4bb3b42b4bc6c8bca
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Nov 6 13:11:09 2014 -0500

    4310: Remove stderr redirect from git rev-list, add it to git tag.  Prefix log
    output with "dispatch: ".  Tweak error message if rev-list fails.

diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb
index dbd50f7..2fc8266 100755
--- a/services/api/script/crunch-dispatch.rb
+++ b/services/api/script/crunch-dispatch.rb
@@ -302,7 +302,7 @@ class Dispatcher
         unless $? == 0 and commit_rev == job.script_version
           # commit does not exist in internal repository, so import the source repository using git fetch-pack
           cmd = "#{git} fetch-pack --no-progress --all #{src_repo.shellescape}"
-          $stderr.puts cmd
+          $stderr.puts "dispatch: #{cmd}"
           $stderr.puts `#{cmd}`
           unless $? == 0
             fail_job job, "git fetch-pack failed"
@@ -317,12 +317,12 @@ class Dispatcher
       # sha1.)
       @job_tags ||= {}
       if not @job_tags[job.uuid]
-        cmd = "#{git} tag #{job.uuid.shellescape} #{job.script_version.shellescape}"
-        $stderr.puts cmd
+        cmd = "#{git} tag #{job.uuid.shellescape} #{job.script_version.shellescape} 2>/dev/null"
+        $stderr.puts "dispatch: #{cmd}"
         $stderr.puts `#{cmd}`
         unless $? == 0
           # git tag failed.  This may be because the tag already exists, so check for that.
-          tag_rev = `#{git} rev-list -n1 #{job.uuid.shellescape} 2>/dev/null`.chomp
+          tag_rev = `#{git} rev-list -n1 #{job.uuid.shellescape}`.chomp
           if $? == 0
             # We got a revision back
             if tag_rev != job.script_version
@@ -334,7 +334,7 @@ class Dispatcher
             # we're okay (fall through to setting @job_tags below)
           else
             # git rev-list failed for some reason.
-            fail_job job, "'git tag' for #{job.uuid} failed but did not find the tag using 'git rev-list'"
+            fail_job job, "'git tag' for #{job.uuid} failed but did not find any existing tag using 'git rev-list'"
             next
           end
         end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list