def revisions(self, path, max_revisions):
if self.repo.is_dirty():<EOL><INDENT>raise DirtyGitRepositoryError(self.repo.untracked_files)<EOL><DEDENT>revisions = []<EOL>for commit in self.repo.iter_commits(<EOL>self.current_branch, max_count=max_revisions<EOL>):<EOL><INDENT>rev = Revision(<EOL>key=commit.name_rev.split("<STR_LIT:U+0020>")[<NUM_LIT:0>],<EOL>author_name=commit.author.name,<EOL>author_email=commit.author.email,<EOL>date=commit.committed_date,<EOL>message=commit.message,<EOL>)<EOL>revisions.append(rev)<EOL><DEDENT>return revisions<EOL>
Get the list of revisions.

:param path: the path to target.
:type  path: ``str``

:param max_revisions: the maximum number of revisions.
:type  max_revisions: ``int``

:return: A list of revisions.
:rtype: ``list`` of :class:`Revision`