summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-06-30 09:40:18 +0200
committerGuido Günther <agx@sigxcpu.org>2012-06-30 09:43:54 +0200
commitdd593a0facc0fb3ee7093e5c18f86427372f6998 (patch)
treebb2b50c4f48b8cdd30c432b290853f19c8b0c478 /gbp
parent1e8597804ff33ec7e826e77b94fd371d4be9ef29 (diff)
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.
Diffstat (limited to 'gbp')
-rw-r--r--gbp/git/repository.py8
-rw-r--r--gbp/scripts/dch.py4
2 files changed, 7 insertions, 5 deletions
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