1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-10 08:52:39 +01:00

Some mercurial parsing fixes

Summary: Parse some other fields which I hadn't seen yet from "hg log". Select
the right "hg log" range for local commit info.

Test Plan: Ran "arc diff" in my test mercurial repository from a branch with
tags. Looked at "local commits" in Differential.

Reviewers: Makinde, aran, jungejason, tuomaspelkonen

Reviewed By: Makinde

CC: aran, Makinde

Differential Revision: 880
This commit is contained in:
epriestley 2011-08-31 11:51:56 -07:00
parent e9b7f8e3ca
commit 02344602c1

View file

@ -88,7 +88,13 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
$this->getPath(),
$this->getRelativeCommit(),
'tip');
return $this->parseMercurialLog($info);
$logs = $this->parseMercurialLog($info);
// Get rid of the first log, it's not actually part of the diff. "hg log"
// is inclusive, while "hg diff" is exclusive.
array_shift($logs);
return $logs;
}
@ -304,6 +310,12 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
'rev' => $rev,
);
break;
case 'branch':
$commit['branch'] = $value;
break;
case 'tag':
$commit['tag'] = $value;
break;
default:
throw new Exception("Unknown Mercurial log field '{$name}'!");
}