1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 16:52:40 +01:00

Blame command in Mercurial is named annotate

Summary: Also invalid regular expression

Test Plan: arc cover

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1192
This commit is contained in:
Jakub Vrana 2011-12-12 14:28:34 -08:00
parent 0788220af4
commit db402a6836

View file

@ -136,10 +136,9 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
return $logs; return $logs;
} }
public function getBlame($path, $mode) {
public function getBlame($path) {
list($stdout) = execx( list($stdout) = execx(
'(cd %s && hg blame -u -v -c --rev %s -- %s)', '(cd %s && hg annotate -u -v -c --rev %s -- %s)',
$this->getPath(), $this->getPath(),
$this->getRelativeCommit(), $this->getRelativeCommit(),
$path); $path);
@ -151,7 +150,7 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
} }
$matches = null; $matches = null;
$ok = preg_match('^/\s*([^:]+?) [a-f0-9]{12}: (.*)$/', $line, $matches); $ok = preg_match('/^\s*([^:]+?) [a-f0-9]{12}: (.*)$/', $line, $matches);
if (!$ok) { if (!$ok) {
throw new Exception("Unable to parse Mercurial blame line: {$line}"); throw new Exception("Unable to parse Mercurial blame line: {$line}");