diff options
-rw-r--r-- | gbp/git/repository.py | 8 | ||||
-rw-r--r-- | gbp/scripts/dch.py | 4 | ||||
-rw-r--r-- | tests/test_GitRepository.py | 2 |
3 files changed, 8 insertions, 6 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 diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index 78c38b4..1830c6c 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -357,7 +357,7 @@ def test_get_commit_info(): '' >>> info['subject'] 'foo' - >>> '@' in info['email'] + >>> '@' in info['author'].email True """ |