From dd593a0facc0fb3ee7093e5c18f86427372f6998 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sat, 30 Jun 2012 09:40:18 +0200 Subject: GitRepository: return GitModifier object instead of separate fields this make sure the number of return values doesn't stays sane when also returning timestamps and committer information. --- gbp/git/repository.py | 8 +++++--- gbp/scripts/dch.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'gbp') diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 2a8cdd8..4d4e402 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1200,13 +1200,15 @@ class GitRepository(object): % commit) fields = out.split('\x00') + + author = GitModifier(fields[0].strip(), + fields[1].strip()) + return {'id' : commit, - 'author' : fields[0].strip(), - 'email' : fields[1].strip(), + 'author' : author, 'subject' : fields[2], 'body' : fields[3]} - #{ Patches def format_patches(self, start, end, output_dir, signature=True, thread=None): """ diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py index ba96631..6d88ea6 100644 --- a/gbp/scripts/dch.py +++ b/gbp/scripts/dch.py @@ -249,8 +249,8 @@ def do_snapshot(changelog, repo, next_snapshot): def parse_commit(repo, commitid, opts, last_commit=False): """Parse a commit and return message, author, and author email""" commit_info = repo.get_commit_info(commitid) - author = commit_info['author'] - email = commit_info['email'] + author = commit_info['author'].name + email = commit_info['author'].email format_entry = user_customizations.get('format_changelog_entry') if not format_entry: format_entry = dch.format_changelog_entry -- cgit v1.2.3