Skip to content

Commit

Permalink
preparing for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
ishepard committed Nov 2, 2018
1 parent c511beb commit 4433dec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
34 changes: 14 additions & 20 deletions pydriller/domain/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,23 +404,17 @@ def __eq__(self, other):
return self.__dict__ == other.__dict__

def __str__(self):
return ('Hash: {}'.format(self.hash) + '\n'
'Author: {}'.format(self.author.name) + '\n'
'Author email: {}'.format(
self.author.email) + '\n'
'Committer: {}'.format(self.committer.name) + '\n'
'Committer email: {}'.format(
self.committer.email) + '\n'
'Author date: {}'.format(self.author_date.strftime("%Y-%m-%d %H:%M:%S")) + '\n'
'Committer date: {}'.format(
self.committer_date.strftime("%Y-%m-%d %H:%M:%S")) + '\n'
'Message: {}'.format(self.msg) + '\n'
'Parent: {}'.format(
"\n".join(map(str, self.parents))) + '\n'
'Merge: {}'.format(self.merge) + '\n'
'Modifications: \n{}'.format(
"\n".join(map(str, self.modifications))) + '\n'
'Branches: \n{}'.format(
"\n".join(map(str, self.branches))) + '\n'
'In main branch: {}'.format(self.in_main_branch)
)
return ('Hash: {}\n'.format(self.hash) +
'Author: {}\n'.format(self.author.name) +
'Author email: {}\n'.format(self.author.email) +
'Committer: {}\n'.format(self.committer.name) +
'Committer email: {}\n'.format(self.committer.email) +
'Author date: {}\n'.format(self.author_date.strftime("%Y-%m-%d %H:%M:%S")) +
'Committer date: {}\n'.format(self.committer_date.strftime("%Y-%m-%d %H:%M:%S")) +
'Message: {}\n'.format(self.msg) +
'Parent: {}\n'.format("\n".join(map(str, self.parents))) +
'Merge: {}\n'.format(self.merge) +
'Modifications: \n{}'.format("\n".join(map(str, self.modifications))) +
'Branches: \n{}'.format("\n".join(map(str, self.branches))) +
'In main branch: {}\n'.format(self.in_main_branch)
)
2 changes: 1 addition & 1 deletion pydriller/repository_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def traverse_commits(self) -> Generator[Commit, None, None]:
all_cs.reverse()

for commit in all_cs:
logger.info('Commit #{} in {} from {}'.format(commit.hash, commit.author_date, commit.author.name))
logger.info('Commit #{} in {} from {}'.format(commit.hash, commit.committer_date, commit.author.name))

if self._is_commit_filtered(commit):
logger.info('Commit #{} filtered'.format(commit.hash))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def read_reqs(filename: str):
long_description = long_description,
author='Davide Spadini',
author_email='spadini.davide@gmail.com',
version='1.5',
version='1.5.1',
packages=find_packages('.'),
url='https://github.com/ishepard/pydriller',
license='Apache License',
Expand Down

0 comments on commit 4433dec

Please sign in to comment.