Class: Bob::SCM::Svn

Inherits:
Abstract show all
Defined in:
lib/bob/scm/svn.rb

Instance Attribute Summary

Attributes inherited from Abstract

#branch, #uri

Instance Method Summary collapse

Methods inherited from Abstract

#dir_for, #initialize, #with_commit

Constructor Details

This class inherits a constructor from Bob::SCM::Abstract

Instance Method Details

#headObject



14
15
16
17
# File 'lib/bob/scm/svn.rb', line 14

def head
  `svn info #{uri}`.split("\n").detect { |l| l =~ /^Revision: (\d+)/ }
  $1.to_s
end

#metadata(rev) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/bob/scm/svn.rb', line 4

def (rev)
  dump = `svn log --non-interactive --revision #{rev} #{uri}`.split("\n")
  meta = dump[1].split(" | ")

  { "id"        => rev,
    "message"   => dump[3],
    "author"    => meta[1],
    "timestamp" => Time.parse(meta[2]) }
end