: 'log %C --format=%s --',
$against,
// NOTE: "%B" is somewhat new, use "%s%n%n%b" instead.
- '%H%x01%T%x01%P%x01%at%x01%an%x01%s%x01%s%n%n%b%x02');
+ '%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02');
$commits = array();
$info = explode("\2", $info);
foreach ($info as $line) {
- list($commit, $tree, $parents, $time, $author, $title, $message)
- = explode("\1", trim($line), 7);
+ list($commit, $tree, $parents, $time, $author, $author_email,
+ $title, $message) = explode("\1", trim($line), 8);
$message = rtrim($message);
$commits[$commit] = array(
'author' => $author,
'summary' => $title,
'message' => $message,
+ 'authorEmail' => $author_email,
);
}
if ($this->localCommitInfo === null) {
list($info) = $this->execxLocal(
"log --template '%C' --rev %s --branch %s --",
- "{node}\1{rev}\1{author}\1{date|rfc822date}\1".
- "{branch}\1{tag}\1{parents}\1{desc}\2",
- '(ancestors(.) - ancestors('.$this->getBaseCommit().'))',
+ "{node}\1{rev}\1{author|emailuser}\1{author|email}\1".
+ "{date|rfc822date}\1{branch}\1{tag}\1{parents}\1{desc}\2",
+ hgsprintf(
+ '(ancestors(.) - ancestors(%s))',
+ $this->getBaseCommit()),
$this->getBranchName());
$logs = array_filter(explode("\2", $info));
$commits = array();
foreach ($logs as $log) {
- list($node, $rev, $author, $date, $branch, $tag, $parents, $desc) =
- explode("\1", $log);
+ list($node, $rev, $author, $author_email, $date, $branch, $tag,
+ $parents, $desc) = explode("\1", $log, 9);
// NOTE: If a commit has only one parent, {parents} returns empty.
// If it has two parents, {parents} returns revs and short hashes, not
'parents' => $commit_parents,
'summary' => head(explode("\n", $desc)),
'message' => $desc,
+ 'authorEmail' => $author_email,
);
$last_node = $node;