added author to changesets

This commit is contained in:
Sebastian Sdorra
2011-04-18 21:18:17 +02:00
parent 21adab42e2
commit 22084dacb9
7 changed files with 271 additions and 21 deletions

View File

@@ -206,14 +206,9 @@ public class GitChangesetViewer implements ChangesetViewer
date = date * 1000;
String author = null;
PersonIdent person = commit.getCommitterIdent();
if (person != null)
{
author = person.getName();
}
PersonIdent authorIndent = commit.getCommitterIdent();
Person author = new Person(authorIndent.getName(),
authorIndent.getEmailAddress());
String message = commit.getShortMessage();
Changeset changeset = new Changeset(id, date, author, message);
Modifications modifications = createModifications(treeWalk, commit);

View File

@@ -147,7 +147,7 @@ public class HgChangesetParser
}
else if ("author".equals(name))
{
changeset.setAuthor(value);
changeset.setAuthor(Person.toPerson(value));
}
else if ("description".equals(name))
{

View File

@@ -179,7 +179,8 @@ public class SvnChangesetViewer implements ChangesetViewer
private Changeset createChangeset(SVNLogEntry entry)
{
Changeset changeset = new Changeset(String.valueOf(entry.getRevision()),
entry.getDate().getTime(), entry.getAuthor(),
entry.getDate().getTime(),
Person.toPerson(entry.getAuthor()),
entry.getMessage());
Map<String, SVNLogEntryPath> changeMap = entry.getChangedPaths();