Skip to content

Commit

Permalink
small var tweak and docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
cpjolicoeur committed May 22, 2009
1 parent 4f1dba0 commit a0cd2f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/site/src/options.page
Expand Up @@ -51,6 +51,7 @@ scm:
user_name:
password:
view: #for perforce only
branch: #for git only
builder:
type:
rake:
Expand Down
7 changes: 3 additions & 4 deletions lib/cerberus/scm/git.rb
Expand Up @@ -15,16 +15,15 @@ def installed?
def update!
if test(?d, @path + '/.git')
extract_last_commit_info
#@status = execute('pull', '')
@status = execute("reset", "--hard #{@revision}") + execute('pull')
else
FileUtils.rm_rf(@path) if test(?d, @path)
encoded_url = (@config[:scm, :url].include?(' ') ? "\"#{@config[:scm, :url]}\"" : @config[:scm, :url])
@status = execute("clone", "#{encoded_url} #{@path}", false)
if @config[:scm, :branch]
@branch = @config[:scm, :branch]
execute('branch', "--track #{@branch} origin/#{@branch}")
execute('checkout', @branch)
branch = @config[:scm, :branch]
execute('branch', "--track #{branch} origin/#{branch}")
execute('checkout', branch)
end
end
end
Expand Down

0 comments on commit a0cd2f9

Please sign in to comment.