[SCM] ci-tooling packaging branch, master, updated. 578931ba4d726523652a3a9edc94012df1916466
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Mon May 11 12:37:49 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=578931b
The following commit has been merged in the master branch:
commit 578931ba4d726523652a3a9edc94012df1916466
Author: Harald Sitter <sitter at kde.org>
Date: Mon May 11 14:23:51 2015 +0200
make sure overrides are applied in sorted order for upstream_scm
previously the filtered matches weren't sorted resulting in not the
best matching rule being used. also add a test for svn detection.
this also happens to test sorting implicitly. unfortunately since the
override file currently isn't being fixtured we can't make it explicit
right now. I'll just hope this doesn't break without anyone noticing for
the time being.
---
lib/ci/upstream_scm.rb | 2 ++
test/test_upstream_scm.rb | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/lib/ci/upstream_scm.rb b/lib/ci/upstream_scm.rb
index 7b38675..c8e9688 100644
--- a/lib/ci/upstream_scm.rb
+++ b/lib/ci/upstream_scm.rb
@@ -90,10 +90,12 @@ class UpstreamSCM
def global_override!
overrides = global_override_load
repo_patterns = CI::Pattern.filter(@packaging_repo, overrides)
+ repo_patterns = CI::Pattern.sort_hash(repo_patterns)
return if repo_patterns.empty?
branches = overrides[repo_patterns.flatten.first]
branch_patterns = CI::Pattern.filter(@packaging_branch, branches)
+ branch_patterns = CI::Pattern.sort_hash(branch_patterns)
return if branch_patterns.empty?
override_apply(branches[branch_patterns.flatten.first])
diff --git a/test/test_upstream_scm.rb b/test/test_upstream_scm.rb
index a45c839..db11c2e 100644
--- a/test/test_upstream_scm.rb
+++ b/test/test_upstream_scm.rb
@@ -15,6 +15,7 @@ class UpstreamSCMTest < TestCase
def test_global_override
base = 'git.debian.org:/git/pkg-kde'
workspace = "#{base}/plasma/plasma-workspace"
+ wallpapers = "#{base}/plasma/plasma-workspace-wallpapers"
qt = "#{base}/qt/qtbase"
scm = UpstreamSCM.new(workspace, 'kubuntu_stable', '/')
assert_equal('Plasma/5.3', scm.branch)
@@ -23,6 +24,12 @@ class UpstreamSCMTest < TestCase
scm = UpstreamSCM.new(qt, 'kubuntu_unstable', '/')
assert_equal('5.4', scm.branch)
assert_equal('http://code.qt.io/git/qt/qtbase.git', scm.url)
+ # Wallpapers is in SVN, make sure the SVN override works as expected.
+ # This should implicitly test sorting as well as the specific wallpaper rule
+ # is written after the generic plasma rule.
+ scm = UpstreamSCM.new(wallpapers, 'kubuntu_unstable', '/')
+ assert_equal('svn', scm.type)
+ assert_equal('svn://anonsvn.kde.org/home/kde/trunk/KDE/plasma-workspace-wallpapers', scm.url)
end
def test_override
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list