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:
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
@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']
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]
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: