You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2022/04/24 16:24:33 UTC
[whimsy] branch master updated (378a2dd0 -> f9c5d1ec)
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
from 378a2dd0 only want projects.json
new 286120b3 Minor tweaks
new f9c5d1ec Allow for dist.a.o updates
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
tools/pubsub2rake.rb | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
[whimsy] 01/02: Minor tweaks
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 286120b3e1d3f4a78d200258c96163dcb0a6e082
Author: Sebb <se...@apache.org>
AuthorDate: Sun Apr 24 17:22:55 2022 +0100
Minor tweaks
---
tools/pubsub2rake.rb | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/tools/pubsub2rake.rb b/tools/pubsub2rake.rb
index b1d9b4ec..8e052700 100755
--- a/tools/pubsub2rake.rb
+++ b/tools/pubsub2rake.rb
@@ -11,6 +11,9 @@ def stamp(*s)
"%s: %s" % [Time.now.gmtime.to_s, s.join(' ')]
end
+# need to fetch all topics to ensure mixed commits are seen
+PUBSUB_URL = 'https://pubsub.apache.org:2070/svn'
+
class PubSub
require 'fileutils'
@@ -105,7 +108,7 @@ if $0 == __FILE__
options = {}
options[:debug] = ARGV.delete('--debug')
# Cannot use shift as ARGV is needed for a relaunch
- pubsub_URL = ARGV[0] || 'https://pubsub.apache.org:2070/svn'
+ pubsub_URL = ARGV[0] || PUBSUB_URL
pubsub_FILE = ARGV[1] || File.join(Dir.home, '.pubsub')
pubsub_CRED = File.read(pubsub_FILE).chomp.split(':') rescue nil
@@ -123,7 +126,7 @@ if $0 == __FILE__
def process(event)
path = event['pubsub_path']
- if WATCH.include? path # WATCH auto-vivifies
+ if WATCH.include? path # WATCH auto-vivifies so cannot use [] here
$hits += 1
log = event['commit']['log'].sub(/\n.*/m, '') # keep only first line
id = event['commit']['id']
@@ -181,7 +184,13 @@ if $0 == __FILE__
end
if pubsub_URL == 'WATCH' # dump keys for use in constructing URL
- WATCH.keys.sort.each {|k| puts k}
+ WATCH.sort.each do |k, v|
+ puts k
+ v.each do |e|
+ print '- '
+ p e
+ end
+ end
exit
end
[whimsy] 02/02: Allow for dist.a.o updates
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit f9c5d1ecee07f413002615e35f3801a952a89ad1
Author: Sebb <se...@apache.org>
AuthorDate: Sun Apr 24 17:24:26 2022 +0100
Allow for dist.a.o updates
---
tools/pubsub2rake.rb | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tools/pubsub2rake.rb b/tools/pubsub2rake.rb
index 8e052700..d324d0fc 100755
--- a/tools/pubsub2rake.rb
+++ b/tools/pubsub2rake.rb
@@ -173,14 +173,22 @@ if $0 == __FILE__
ASF::SVN.repo_entries(true).each do |name, desc|
next if desc['depth'] == 'skip' # not needed
- url = desc['url']
+ # Drop the dist.a.o prefix
+ url = desc['url'].sub(%r{https?://.+?/repos/}, '')
one, two, three = url.split('/', 3)
- next if one.start_with? 'http' # dist.a.o
- path_prefix = one == 'asf' ? ['/svn'] : ['/private', 'svn']
+ path_prefix = %w{asf dist}.include?(one) ? ['/svn'] : ['/private', 'svn']
pubsub_key = [path_prefix, one, two, 'commit'].join('/')
svn_relpath = [two, three].join('/')
WATCH[pubsub_key] << [svn_relpath, name, desc['files']]
+ # N.B. A commit that includes more than one top-level directory
+ # does not include either directory in the pubsub path.
+ # e.g. dev->release dist renames have the path /svn/dist/commit
+ # Allow for this by adding the parent path as well
+ # This is only likely to be needed for dist, but there may
+ # be other commits that mix directories.
+ pubsub_key = [path_prefix, one, 'commit'].join('/')
+ WATCH[pubsub_key] << [svn_relpath, name, desc['files']]
end
if pubsub_URL == 'WATCH' # dump keys for use in constructing URL