Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

implementing git update

  • Loading branch information...
commit b26ed2695204cd90ddf369d63338230a8f0eb268 1 parent e957b0c
David Rouchy authored

Showing 2 changed files with 13 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  extras/big_tuna/vcs/git.rb
  2. +11 0 test/unit/git_vcs_test.rb
3  extras/big_tuna/vcs/git.rb
@@ -56,7 +56,8 @@ def clone(where_to)
56 56 end
57 57
58 58 def update(where_to)
59   -
  59 + command = 'git pull'
  60 + BigTuna::Runner.execute(File.join(Dir.pwd, where_to), command)
60 61 end
61 62 end
62 63 end
11 test/unit/git_vcs_test.rb
@@ -54,6 +54,17 @@ def teardown
54 54 assert vcs.support_incremental_build?
55 55 end
56 56
  57 + test "git update should get commit in the clone" do
  58 + `cd test/files/repo; echo "new file" > new_file; git add new_file; git commit -m "new file"`
  59 + vcs = init_repo("test/files/repo", "master")
  60 + vcs.clone("test/files/repo_clone")
  61 +
  62 + `cd test/files/repo; echo "new file" > new_file_2; git add new_file_2; git commit -m "new second file"`
  63 + vcs.update("test/files/repo_clone")
  64 +
  65 + assert File.file?("test/files/repo_clone/new_file_2"), "The file has not been pulled"
  66 + end
  67 +
57 68 private
58 69 def init_repo(dir = "test/files/repo", branch = "master")
59 70 BigTuna::VCS::Git.new(dir, branch)

0 comments on commit b26ed26

Please sign in to comment.
Something went wrong with that request. Please try again.