]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Blame command in Mercurial is named `annotate`
authorJakub Vrana <jakubv@fb.com>
Mon, 12 Dec 2011 22:28:34 +0000 (14:28 -0800)
committerJakub Vrana <jakubv@fb.com>
Tue, 13 Dec 2011 17:42:22 +0000 (09:42 -0800)
Summary: Also invalid regular expression

Test Plan: arc cover

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: 1192

src/repository/api/mercurial/ArcanistMercurialAPI.php

index a8f2752dfd58c6b4a7811997a4d501f01505a129..4685b5c83e484dc0aaaf1cd0de15658f425153aa 100644 (file)
@@ -136,10 +136,9 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
     return $logs;
   }
 
-
-  public function getBlame($path) {
+  public function getBlame($path, $mode) {
     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->getRelativeCommit(),
       $path);
@@ -151,7 +150,7 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
       }
 
       $matches = null;
-      $ok = preg_match('^/\s*([^:]+?) [a-f0-9]{12}: (.*)$/', $line, $matches);
+      $ok = preg_match('/^\s*([^:]+?) [a-f0-9]{12}: (.*)$/', $line, $matches);
 
       if (!$ok) {
         throw new Exception("Unable to parse Mercurial blame line: {$line}");