summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-10-22 13:40:50 +0200
committerGuido Günther <agx@sigxcpu.org>2011-10-23 14:18:03 +0200
commitf3df4bf7e0ba64f78b33f6d2a3dd3439bfebbd3f (patch)
treeaa4cb7c72ed44c3addfc2accca79677e57edc026
parentde75bbf96dfe58f04005951d0d214322c7a83dda (diff)
GitRepository: rename commits to get_commits
Git-Dch: Ignore
-rwxr-xr-xgbp-pq2
-rw-r--r--gbp/git.py7
-rwxr-xr-xgit-dch8
3 files changed, 10 insertions, 7 deletions
diff --git a/gbp-pq b/gbp-pq
index e7c1efd..1b9a212 100755
--- a/gbp-pq
+++ b/gbp-pq
@@ -216,7 +216,7 @@ def import_quilt_patches(repo, branch, series, tries):
raise GbpError, ("Patch queue branch '%s'. already exists. Try 'rebase' instead."
% pq_branch)
- commits = repo.commits(options=['-%d' % tries], first_parent=True)
+ commits = repo.get_commits(options=['-%d' % tries], first_parent=True)
# If we go back in history we have to safe our pq so we always try to apply
# the latest one
if len(commits) > 1:
diff --git a/gbp/git.py b/gbp/git.py
index 737004c..4b13911 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -358,8 +358,8 @@ class GitRepository(object):
else:
return []
- def commits(self, since=None, until=None, paths=None, options=None,
- first_parent=False):
+ def get_commits(self, since=None, until=None, paths=None, options=None,
+ first_parent=False):
"""
Get commits from since to until touching paths
@@ -368,6 +368,9 @@ class GitRepository(object):
@param paths: only list commits touching paths
@param options: list of options passed to git log
@type options: list of strings
+ @param first_parent: only follow first parent when seeing a
+ merge commit
+ @type first_parent: bool
"""
args = ['--pretty=format:%H']
diff --git a/git-dch b/git-dch
index 423f3cd..17c2e15 100755
--- a/git-dch
+++ b/git-dch
@@ -256,7 +256,7 @@ def guess_snapshot_commit(cp, repo, options):
return None
# If we didn't find a snapshot header we look at the point the changelog
# was last touched.
- last = repo.commits(paths="debian/changelog", options=["-1"])
+ last = repo.get_commits(paths="debian/changelog", options=["-1"])
if last:
gbp.log.info("Changelog last touched at '%s'" % last[0])
return last[0]
@@ -413,9 +413,9 @@ def main(argv):
if args:
gbp.log.info("Only looking for changes on '%s'" % " ".join(args))
- commits = repo.commits(since=since, until=until,
- paths=" ".join(args),
- options=options.git_log.split(" "))
+ commits = repo.get_commits(since=since, until=until,
+ paths=" ".join(args),
+ options=options.git_log.split(" "))
commits.reverse()
# add a new changelog section if: