summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-05-06 15:19:58 +0300
committerGuido Günther <agx@sigxcpu.org>2013-06-11 15:17:44 +0200
commita30f9e772cb8b4c48cca296bb3a7690c3e8ae418 (patch)
treed2d1afeb25f12b28235e7a5170b86f93e0b900a5
parent396607649dc54e8ef65fdf54a27866c3ecd93b23 (diff)
buildpackage: use get_commit_info() instead of get_subject()
Utilize the get_commit_info() method of GitRepository instead of the deprecated get_subject(). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-xgbp/scripts/buildpackage.py2
-rw-r--r--tests/05_test_detection.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 282795a..9f8d578 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -317,7 +317,7 @@ def guess_comp_type(repo, comp_type, cp, tarball_dir):
gbp.log.debug("Found pristine-tar commit at '%s'" % commit)
else:
commit = repo.pristine_tar_branch
- tarball = repo.get_subject(commit)
+ tarball = repo.get_commit_info(commit)['subject']
comp_type = du.DebianPkgPolicy.get_compression(tarball)
gbp.log.debug("Determined compression type '%s'" % comp_type)
if not comp_type:
diff --git a/tests/05_test_detection.py b/tests/05_test_detection.py
index 8ae5265..126a299 100644
--- a/tests/05_test_detection.py
+++ b/tests/05_test_detection.py
@@ -24,8 +24,8 @@ class MockGitRepository:
def grep_log(self, regex, branch):
return None
- def get_subject(self, commit):
- return self.subject
+ def get_commit_info(self, commit):
+ return {'subject': self.subject}
class TestDetection(unittest.TestCase):
def setUp(self):