[SCM] ci-tooling packaging branch, master, updated. 826f763a489e803c9dad55937172ce118a9bae70

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Jan 12 11:32:42 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=826f763

The following commit has been merged in the master branch:
commit 826f763a489e803c9dad55937172ce118a9bae70
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Jan 12 12:32:40 2015 +0100

    project: pull first, checkout later, raise on error
    
    pulling first allows new branches to be picked up
    
    raising prevents us from creating projects that couldn't possibly be
    integrated for a given type, slightly fishy I must admit
---
 lib/projects.rb | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/lib/projects.rb b/lib/projects.rb
index 3e15c3c..3b18af9 100644
--- a/lib/projects.rb
+++ b/lib/projects.rb
@@ -55,11 +55,15 @@ class Project
             Dir.chdir(name) do
                 system("git clean -fd")
                 system("git reset --hard")
-                system("git checkout kubuntu_#{type}")
 
                 i = 0
-                while true and (i+=1) < 5
-                    break if system("git pull")
+                while (i+=1) < 5
+                  break if system("git pull")
+                end
+                raise "Failed to pull" if i >= 5
+
+                unless system("git checkout kubuntu_#{type}")
+                  raise "No branch #{type}"
                 end
 
                 next unless File.exist?('debian/control')
@@ -109,13 +113,19 @@ class ProjectFactory
       value.each do |component|
         repos = list_all_repos(component)
         repos.each do |name|
-          ret << Project.new(name, component, type: type)
+          begin
+            ret << Project.new(name, component, type: type)
+          rescue
+          end
         end
       end
     when "selective_repos"
       value.each do |component, names|
         names.each do |name|
-          ret << Project.new(name, component, type: type)
+          begin
+            ret << Project.new(name, component, type: type)
+          rescue
+          end
         end
       end
     when "custom_ci"
@@ -136,7 +146,10 @@ class ProjectFactory
 
         puts repos
         repos.each do |repo|
-          self << Project.new(repo, custom_ci['org'], custom_ci['git_host'], type: type)
+          begin
+            self << Project.new(repo, custom_ci['org'], custom_ci['git_host'], type: type)
+          rescue
+          end
         end
       end
     else

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list