From 79d7411e1ed0199534dd5c1fb18fbf691c90aa68 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 15 Jun 2010 14:08:29 -0700 Subject: Update for new GitPython API I hate working with immature stuff (like myself) --- src/pyfedpkg/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 5186c87..9350207 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -318,7 +318,7 @@ class PackageModule: if not url: # We don't have a url, so build from the latest commit # Check to see if the tree is dirty - if self.repo.is_dirty: + if self.repo.is_dirty(): 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 @@ -326,7 +326,7 @@ class PackageModule: if self.repo.git.rev_list('...origin/%s' % self.repo.active_branch): raise FedpkgError('There are unpushed changes in your repo') # Get the commit hash to build - commit = self.repo.commits(max_count=1)[0].id + commit = self.repo.iter_commits().next().sha url = ANONGITURL % {'module': self.module} + '?#%s' % commit # Check to see if the target is valid build_target = self.kojisession.getBuildTarget(self.target) -- cgit