Set default to :git from :subversion #218

Closed
wants to merge 1 commit into
from

6 participants

@czarneckid

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

@genexp

Seriously, +100000

@hayesr

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

@leehambley
Capistrano member

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)

@ricokareem

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
@czarneckid

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

@leehambley
Capistrano member

I like that!

@czarneckid czarneckid closed this Jun 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment