mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +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:
parent
e9b7f8e3ca
commit
02344602c1
1 changed files with 13 additions and 1 deletions
|
@ -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}'!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue