This is an automated email from the ASF dual-hosted git repository.

rubys 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 1b5f051  add --svn and --git
1b5f051 is described below

commit 1b5f05117d2e232d33b3efb00fc4f04b031b3254
Author: Sam Ruby <[email protected]>
AuthorDate: Sat Nov 30 14:56:12 2019 -0500

    add --svn and --git
---
 DOCKER.md         | 18 ++++++++++++++++++
 SETUPMYMAC.MD     | 21 ---------------------
 config/setupmymac | 23 ++++++++++++++++++++++-
 3 files changed, 40 insertions(+), 22 deletions(-)

diff --git a/DOCKER.md b/DOCKER.md
index 920e372..14d844c 100644
--- a/DOCKER.md
+++ b/DOCKER.md
@@ -92,6 +92,24 @@ If any of the configuration files under .subversion etc 
contain absolute referen
 files (such as CA certificates), these will need to be fixed somehow (e.g. 
create links on
 the container)
 
+Note on Repositories
+--------------------
+
+If you don't want to check out all of the repositories, omit the 
+`rake docker:update svn:update git:pull`, and only checkout/clone
+the repositories that you need.  You can find the complete list in
+[repository.yml](./repository.yml).
+
+If you haven't checked out a repository that you need to run a specific tool,
+you will generally see an exception like the following in your logs:
+
+    Unable to find svn checkout for 
https://svn.apache.org/repos/private/foundation/board (foundation_board) 
(Exception)
+
+To correct this, do the following:
+
+    cd /srv/svn
+    svn co https://svn.apache.org/repos/private/foundation/board 
foundation_board
+
 Known not to work (ToDos)
 -------------------------
 
diff --git a/SETUPMYMAC.MD b/SETUPMYMAC.MD
index 684be33..a4b409f 100644
--- a/SETUPMYMAC.MD
+++ b/SETUPMYMAC.MD
@@ -14,27 +14,6 @@ Once complete, you will have a virtual host defined as 
`whimsy.local` that
 you can access in your web browser.  The whole process should take about
 five minutes, possibly less if you already have things like `brew` installed.
 
-What you won't have yet is the various svn repostories checked out that you
-will need.  For example, if you go to the board agenda application, after you
-provide your Apache LDAP user and password you will see a screen showing an
-error:
-
-    Unable to find svn checkout for 
https://svn.apache.org/repos/private/foundation/board (foundation_board) 
(Exception)
-
-To correct this, do the following:
-
-    cd /srv/svn
-    svn co https://svn.apache.org/repos/private/foundation/board 
foundation_board
-
-Now you will have the board agenda tool up and running, but over time you will
-find that you need more svn repositories checked out.  You can repeat this
-process each time, or check out everything you possibly might ever need (which
-currently required 93G! - something Sebb is working on getting down) with the
-following command:
-
-    cd /srv/svn/whimsy
-    rake svn:update
-
 Don't want to instal things on your machine?  If you have Docker installed, you
 can use that instead, simply pass `--docker` to the `setupmymac` command above
 and you will have a Docker image created.  This will take longer, require more
diff --git a/config/setupmymac b/config/setupmymac
index fd3514a..7927152 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -27,10 +27,13 @@ COMMAND = File.realpath($0)
 ARGS = ARGV.dup
 Dir.chdir WHIMSY
 
-force = {}
 restart_apache = false
 $brew_updated = false
 
+force = {}
+force[:svn] = true unless Dir.exists? '/srv/svn'
+force[:git] = true unless Dir.exists? '/srv/git'
+
 ### Convenience methods
 
 # output a header line, in color if available
@@ -107,6 +110,14 @@ OptionParser.new do |opts|
     force[:ldap] = opts
   end
 
+  opts.on('--[no-]svn', "Checkout/update svn repositories") do |opt|
+    force[:svn] = opts
+  end
+
+  opts.on('--[no-]git', "Clone/pull git repositories`") do |opt|
+    force[:git] = opts
+  end
+
   opts.on('--[no-]source', "Pull the latest changes to the source code") do 
|opt|
     force[:source] = opt
   end
@@ -316,6 +327,16 @@ if Process.uid != 0
   end
 end
 
+### Checkout/clone repositories
+
+if force[:svn] and Process.uid != 0
+  run 'rake', 'svn:update'
+end
+
+if force[:git] and Process.uid != 0
+  run 'rake', 'git:pull'
+end
+
 ### Configure LDAP
 
 if File.exist? "#{WHIMSY}/Gemfile.lock"

Reply via email to