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 2019/12/03 00:02:03 UTC
[whimsy] branch master updated: WHIMSY-304 - only checkout needed
files
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
The following commit(s) were added to refs/heads/master by this push:
new a745709 WHIMSY-304 - only checkout needed files
a745709 is described below
commit a74570990a8805079a29e2b2f6a3775d4c4982df
Author: Sebb <se...@apache.org>
AuthorDate: Tue Dec 3 00:01:51 2019 +0000
WHIMSY-304 - only checkout needed files
---
Rakefile | 25 ++++++++++++++++-
repository.yml | 11 ++++++--
www/status/monitors/svn.rb | 68 ++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 99 insertions(+), 5 deletions(-)
diff --git a/Rakefile b/Rakefile
index c0841d1..352fa21 100644
--- a/Rakefile
+++ b/Rakefile
@@ -135,6 +135,16 @@ namespace :svn do
if Dir.exist? name
Dir.chdir(name) {
system 'svn cleanup'
+ depth = description['depth']
+ files = description['files']
+ next unless files # TEMP
+ if depth == 'empty'
+ curdepth = ASF::SVN.getInfoAsHash('.')['Depth'] # not available as separate item
+ if curdepth != depth
+ puts "#{PREFIX} update depth from '#{curdepth}' to '#{depth}'"
+ system 'svn','update','--set-depth',depth
+ end
+ end
outerr = nil
# svn update can fail sometimes, so we retry
2.times do |i|
@@ -150,7 +160,14 @@ namespace :svn do
end
begin
r, w = IO.pipe
- pid = Process.spawn('svn up', out: w, err: [:child, :out])
+ # Note: list the files to update to cater for later additions
+ if files
+ svncmd = "svn update #{files.join(' ')}"
+ puts "#{PREFIX} #{svncmd}"
+ else
+ svncmd = 'svn update'
+ end
+ pid = Process.spawn(svncmd, out: w, err: [:child, :out])
w.close
pid, status = Process.wait2
@@ -172,6 +189,12 @@ namespace :svn do
system 'svn', 'checkout',
"--depth=#{description['depth'] || 'infinity'}",
svnpath, name
+ files = description['files']
+ if files
+ Dir.chdir(name) {
+ system 'svn', 'update', *files
+ }
+ end
end
end
end
diff --git a/repository.yml b/repository.yml
index 95d41b5..6989ec5 100644
--- a/repository.yml
+++ b/repository.yml
@@ -37,7 +37,11 @@
apmail_bin:
url: infra/infrastructure/apmail/trunk/bin
- depth: files
+ depth: empty
+ files:
+ - .archives
+ - deprecated_mailing_lists.yml
+ - mail_list_autosub.yml
attic-xdocs:
url: asf/attic/site/xdocs/projects
@@ -111,7 +115,10 @@
# for access to badrcptto files:
qmail_control:
url: infra/infrastructure/trunk/qmail/control
- depth: files
+ depth: empty
+ files:
+ - badrcptto
+ - badrcptto_patterns
site-board:
url: asf/infrastructure/site/trunk/content/foundation/board
diff --git a/www/status/monitors/svn.rb b/www/status/monitors/svn.rb
index d6633f9..4d5d526 100644
--- a/www/status/monitors/svn.rb
+++ b/www/status/monitors/svn.rb
@@ -16,7 +16,7 @@ Danger - unexpected text in log file
require 'fileutils'
# Match revision messages
-REV_RE = %r{^(Checked out|Updated to|At|List updated from \d+ to|List is at) revision \d+\s*\.$}
+REV_RE = %r{^(Checked out|\s*Updated ('[^']+' )?to|At|List updated from \d+ to|List is at) (revision |r)\d+\s*\.$}
def Monitor.svn(previous_status)
logdir = File.expand_path('../../../logs', __FILE__)
@@ -46,7 +46,8 @@ def Monitor.svn(previous_status)
repository = lines.shift.to_sym
lines.reject! do |line|
- line == "Updating '.':" or
+ line =~ %r{Updating '.+':} or
+ line == "Summary of updates:" or
# must agree with Rakefile/PREFIX
line.start_with?('#!: ') or
line =~ REV_RE
@@ -147,3 +148,66 @@ svn: E175002: Unexpected HTTP status 400 'Bad Request' on '/repos/private/!svn/r
Updating '.':
svn: E175002: Unexpected HTTP status 400 'Bad Request' on '/repos/private/!svn/rvr/76960/foundation/officers/personnel-duties'
Updated to revision 1797393.
+
+/srv/svn/qmail_control1
+#!: svn update badrcptto badrcptto_patterns
+Updating 'badrcptto':
+At revision 1053537.
+Updating 'badrcptto_patterns':
+At revision 1053537.
+Summary of updates:
+ Updated 'badrcptto' to r1053537.
+ Updated 'badrcptto_patterns' to r1053537.
+
+/srv/svn/qmail_control2
+#!: update depth from 'files' to 'empty'
+D badheaders
+D badheaders.new
+D badheaderthresh
+D badmailfrom
+D badrcptto
+D badrcptto_patterns
+D concurrencylocal
+D concurrencyremote
+D defaultdelivery
+D defaultdomain
+D doublebounceto
+D helohost
+D locals
+D me
+D me.asf
+D newsmtp
+D plusdomain
+D queuelifetime
+D rcpthosts
+D rcpthosts.asf
+D signatures
+D smtproutes
+D timeoutconnect
+D timeoutremote
+D timeoutsmtpd
+D virtualdomains
+Updating '.':
+Updated to revision 1053537.
+#!: svn update badrcptto badrcptto_patterns
+Updating 'badrcptto':
+A badrcptto
+Updated to revision 1053537.
+Updating 'badrcptto_patterns':
+A badrcptto_patterns
+Updated to revision 1053537.
+Summary of updates:
+ Updated 'badrcptto' to r1053537.
+ Updated 'badrcptto_patterns' to r1053537.
+
+/srv/svn/qmail_control3
+Checked out revision 1053537.
+Updating 'badrcptto':
+A badrcptto
+Updated to revision 1053537.
+Updating 'badrcptto_patterns':
+A badrcptto_patterns
+Updated to revision 1053537.
+Summary of updates:
+ Updated 'badrcptto' to r1053537.
+ Updated 'badrcptto_patterns' to r1053537.