Class: Cerberus::SCM::Bazaar
- Inherits:
-
Base
- Object
- Base
- Cerberus::SCM::Bazaar
show all
- Defined in:
- lib/cerberus/scm/bzr.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #url
Instance Method Details
#current_revision ⇒ Object
30
31
32
|
# File 'lib/cerberus/scm/bzr.rb', line 30
def current_revision
@revision
end
|
#has_changes? ⇒ Boolean
26
27
28
|
# File 'lib/cerberus/scm/bzr.rb', line 26
def has_changes?
@revision.to_i > @old_revision.to_i
end
|
#installed? ⇒ Boolean
7
8
9
|
# File 'lib/cerberus/scm/bzr.rb', line 7
def installed?
exec_successful? "#{@config[:bin_path]}bzr --version"
end
|
#last_author ⇒ Object
38
39
40
|
# File 'lib/cerberus/scm/bzr.rb', line 38
def last_author
@author
end
|
#last_commit_message ⇒ Object
34
35
36
|
# File 'lib/cerberus/scm/bzr.rb', line 34
def last_commit_message
@message
end
|
#update! ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/cerberus/scm/bzr.rb', line 11
def update!
if test(?d, File.join(@path, '.bzr'))
@old_revision = @revision
execute("revert", "--no-backup 2>&1")
@status = execute("update", "2>&1")
else
@old_revision = 0
FileUtils.rm_rf(@path) if test(?d, @path)
@status = execute("checkout", nil, @config[:scm, :url])
end
end
|