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 From 8cb33bddd1feeceb55d979b60531bb9b248d7b93 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 15 Jun 2010 14:08:47 -0700 Subject: Make sure we have the right verison of GitPython 0.2.0 introduced new API changes. --- fedora-packager.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora-packager.spec b/fedora-packager.spec index 67564fe..4f0f4dd 100644 --- a/fedora-packager.spec +++ b/fedora-packager.spec @@ -20,7 +20,7 @@ Requires: mock cvs curl wget make openssh-clients Requires: pyOpenSSL python-pycurl Requires: redhat-rpm-config Requires: python-offtrac -Requires: GitPython python-argparse +Requires: GitPython >= 0.2.0, python-argparse BuildArch: noarch -- cgit