Module: Scm::Svn

Defined in:
lib/eo/scm/svn.rb

Instance Method Summary collapse

Instance Method Details

#initObject



3
4
5
# File 'lib/eo/scm/svn.rb', line 3

def init
  system("svn co #{self.repo} #{self.path}")
end

#now_commitObject



18
19
20
# File 'lib/eo/scm/svn.rb', line 18

def now_commit
  return `svn -l 1 log -q | sed '1d;3d' | awk '{print $1}'`
end

#updateObject



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

def update
  old_commit = now_commit
  system("svn update")
  new_commit = now_commit
  if new_commit != old_commit && self.autorun
    self.autorun.split(';').each do |x|
      eval x
    end
  end
end