Skip to content

Commit

Permalink
using active_branch rather than heads[0] (thanks @Rizziepit)
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed May 13, 2015
1 parent fd1cd45 commit eab256e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions unicore/distribute/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def run(self, repo_dir, ini_file, base_url):
def pull_repo(self, env, repo):
sm = StorageManager(repo)
remote = repo.remotes[0]
head = repo.heads[0]
original_commit = head.commit
sm.pull(branch_name=head.name,
branch = repo.active_branch
original_commit = branch.commit
sm.pull(branch_name=branch.name,
remote_name=remote.name)
last_commit = repo.heads[0].commit
last_commit = branch.commit
if original_commit.hexsha != last_commit.hexsha:
name = os.path.basename(repo.working_dir)
request = env['request']
Expand Down

0 comments on commit eab256e

Please sign in to comment.