[Xfce4-commits] <moka:nick/maintainer-improvements> Allow prepending other content to gitolite.conf.

Nick Schermer noreply at xfce.org
Tue Oct 18 20:36:01 CEST 2011


Updating branch refs/heads/nick/maintainer-improvements
         to bc73cd4ee8ec6e61c036d185bb07cd747b01efdd (commit)
       from 0a2bfa581073c4836c653d7ad6cae63e41a30a89 (commit)

commit bc73cd4ee8ec6e61c036d185bb07cd747b01efdd
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Oct 18 20:34:45 2011 +0200

    Allow prepending other content to gitolite.conf.

 lib/helpers/gitolite.rb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/lib/helpers/gitolite.rb b/lib/helpers/gitolite.rb
index d16230b..41e9017 100644
--- a/lib/helpers/gitolite.rb
+++ b/lib/helpers/gitolite.rb
@@ -6,7 +6,7 @@ module Moka
   class Gitolite
     include Moka::Models
 
-    def run(gitolitedir)
+    def run(gitolitedir, prepend_files = nil)
       keydir = File.join(gitolitedir, "keydir")
       File.makedirs(keydir) unless File.directory?(keydir)
 
@@ -28,6 +28,14 @@ module Moka
 
       conf = "# This file is generated by Moka\n\n"
 
+      if prepend_files
+        for filename in prepend_files
+          file = File.new(filename, "r")
+          file.each {|line| conf << line }
+          file.close
+        end
+      end
+
       for classification in Moka::Models::Classification.find_all.sort
         for project in classification.project_names.sort
           conf << "repo " + classification.name + "/" + project + "\n"


More information about the Xfce4-commits mailing list