Method: Nixenvironment::SCM.current

Defined in:
lib/nixenvironment/scm.rb

.currentObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/nixenvironment/scm.rb', line 7

def self.current
  %x[ git status ]
  return SCM_GIT if $?.success?

  %x[ hg status ]
  return SCM_MERCURIAL if $?.success?

  %x[ svn info ]
  return SCM_SVN if $?.success?

  return 'undefined'
end