[SCM] patch-parser packaging branch, master, updated. 43474b21f016a6c6ceaa1bd528e34a0ab6b65fbb
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Tue Apr 14 07:56:05 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/patch-parser.git;a=commitdiff;h=efcdc8e
The following commit has been merged in the master branch:
commit efcdc8e7cca985edeaddcba96295c147d028e87f
Author: Harald Sitter <sitter at kde.org>
Date: Tue Apr 14 09:46:33 2015 +0200
convert to ruby 1.9 hash syntax as we run this against 1.9 apparently
---
lib/patch.rb | 10 +++++++---
render.rb | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/patch.rb b/lib/patch.rb
index ef023b6..82cd1f5 100644
--- a/lib/patch.rb
+++ b/lib/patch.rb
@@ -17,9 +17,13 @@ class Patch
# [String] Date the patch was last updated
attr_reader :last_update
- def initialize(file, repo, branch:)
+ def initialize(file, repo, opts = { :branch => nil })
+ # The parser appears to run on a kubuntu host which uses ruby1.9 by default.
+ # So we can not use ruby 2.0 hash syntax here and instead need to resort to
+ # old-style hash option collecting.
+
@name = File.basename(file)
- @url = self.class.url(file, repo, branch: branch)
+ @url = self.class.url(file, repo, opts.fetch(:branch, nil))
@origin = 'other'
@origin = 'kubuntu' if @name.start_with?('kubuntu_')
@origin = 'upstream' if @name.start_with?('upstream_')
@@ -31,7 +35,7 @@ class Patch
private
- def self.url(file, repo, branch:)
+ def self.url(file, repo, branch)
format('%<base>s/%<repo>s/tree/%<file>s?h=%<branch>s',
base: 'http://anonscm.debian.org/cgit/pkg-kde',
repo: repo,
diff --git a/render.rb b/render.rb
index f5d2f02..49944da 100644
--- a/render.rb
+++ b/render.rb
@@ -33,7 +33,7 @@ Dir.chdir('cache') do
# Filter out what's not a patch
next if File.directory?(file) || File.basename(file) == 'series'
# TODO: Patch presently does not fall back to git if a patch is not dep3
- patches << Patch.new(file, repo.split(':').last, branch: branch)
+ patches << Patch.new(file, repo.split(':').last, { :branch => branch })
end
next if patches.empty?
repos << Repo.new(repo, patches)
--
patch-parser packaging
More information about the pkg-kde-commits
mailing list