diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-07-28 16:47:48 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-07-28 16:51:37 -0700 |
commit | c9b1b3faa2fc51e79ffc67c8b26791b8164d489e (patch) | |
tree | c2d6b0be33fea5cf98e77ebc822dfaa83226692f /src/pyfedpkg/__init__.py | |
parent | 4188315ed718117f15a8eaef0640dbf710824f72 (diff) | |
download | fedora-packager-c9b1b3faa2fc51e79ffc67c8b26791b8164d489e.tar.gz fedora-packager-c9b1b3faa2fc51e79ffc67c8b26791b8164d489e.tar.xz fedora-packager-c9b1b3faa2fc51e79ffc67c8b26791b8164d489e.zip |
Fix checking for unpushed changes on a branch
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r-- | src/pyfedpkg/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 57b9a39..7705a80 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -724,8 +724,10 @@ class PackageModule: raise FedpkgError('There are uncommitted changes in your repo') # Need to check here to see if the local commit you want to build is # pushed or not - # This doesn't work if the local branch name doesn't match the remote - if self.repo.git.rev_list('...origin/%s' % self.repo.active_branch): + branch = self.repo.active_branch + remote = self.repo.git.config('--get', + 'branch.%s.merge' % branch).replace('refs/heads', 'origin') + if self.repo.git.rev_list('%s...%s' % (branch, remote)): raise FedpkgError('There are unpushed changes in your repo') # Get the commit hash to build commit = self.repo.iter_commits().next().sha |