Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Set default to :git from :subversion #218

Closed
wants to merge 1 commit into from

6 participants

David Czarnecki Brian Corrigan Eric Hayes Blake Taylor Lee Hambley Rico Rodriquez Collins
David Czarnecki

Changes default SCM from Subversion to git. This also seems to jive with the documentation on the wiki with respect to configuration variables.

Brian Corrigan

Seriously, +100000

Eric Hayes

+1 —Was wondering about this just the other day.

Lee Hambley
Owner

There's some work I'd like to do on top of this, but thanks for the kick in the ass. I'll look more closely at this in the coming days. (I want to make it clearer how to use local and remote repositories, and change some other defaults)

Rico Rodriquez Collins

last try with this comment. :-)

Would something like this help?

_cset :scm, scm_default


# This defaults your :scm variable to svn as long as your have .svn 
# (code is checked out from Subversion) in the directory where you run cap.
# If not, and you have .git instead (code is checked out from Git), then
# set :scm variable to git.

def scm_default
  if File.exist? '.svn'
    :subversion
  elsif File.exist? '.git'
    :git
  end
end
David Czarnecki

I could certainly amend the commit with this behavior. What do you think @leehambley ?

Lee Hambley
Owner

I like that!

David Czarnecki czarneckid closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 2, 2012
  1. David Czarnecki
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +1 −1  bin/capify
  2. +2 −2 lib/capistrano/recipes/deploy.rb
2  bin/capify
View
@@ -51,7 +51,7 @@ files = {
"config/deploy.rb" => 'set :application, "set your application name here"
set :repository, "set your repository location here"
-set :scm, :subversion
+set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "your web-server here" # Your HTTP server, Apache/etc
4 lib/capistrano/recipes/deploy.rb
View
@@ -22,7 +22,7 @@ def _cset(name, *args, &block)
# are not sufficient.
# =========================================================================
-_cset :scm, :subversion
+_cset :scm, :git
_cset :deploy_via, :checkout
_cset(:deploy_to) { "/u/apps/#{application}" }
@@ -213,7 +213,7 @@ def try_runner(*args)
task (if you want to perform the `restart' task separately).
You will need to make sure you set the :scm variable to the source \
- control software you are using (it defaults to :subversion), and the \
+ control software you are using (it defaults to :git), and the \
:deploy_via variable to the strategy you want to use to deploy (it \
defaults to :checkout).
DESC
Something went wrong with that request. Please try again.