lib/test_ids/git.rb in test_ids-0.3.2 vs lib/test_ids/git.rb in test_ids-0.4.0
- old
+ new
@@ -45,11 +45,11 @@
def publish
Origen.profile 'Publishing the test IDs store' do
release_lock
repo.add # Checkin everything
repo.commit('Publishing latest store')
- repo.push('origin')
+ repo.push('origin', 'master', force: true)
end
end
# Writes the data to the given file and pushes to the remote repo
def write(path, data = nil)
@@ -85,10 +85,11 @@
end
def available_to_lock?
result = false
Origen.profile 'Checking for lock' do
- repo.pull
+ repo.fetch
+ repo.reset_hard
if lock_content && lock_user && lock_user != User.current.name
result = Time.now.to_f > lock_expires
else
result = true
end