]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Ignore remote errors in parsing Mercurial log
authorvrana <jakubv@fb.com>
Thu, 7 Mar 2013 00:32:38 +0000 (16:32 -0800)
committervrana <jakubv@fb.com>
Thu, 7 Mar 2013 19:14:49 +0000 (11:14 -0800)
Summary:
This probably indicates some none fatal error, e.g.:

> remote: Certificate invalid: name is not a listed principal

The best thing here would be to avoid the error but we shouldn't explode even if it is there.
I tried to mute the error from the output but didn't find a switch or config option to do it.

Test Plan:
  $ hg outgoing --branch default --style default

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5267

src/repository/parser/ArcanistMercurialParser.php

index 814a95b72426588357329f8cf391e41a73c1ab99..884e37bb0e1bf24811dd25483f475d1d4554f385 100644 (file)
@@ -127,6 +127,12 @@ final class ArcanistMercurialParser {
           // format is otherwise identical to "hg log".
           continue;
         }
+
+        if (preg_match('/^remote:/', $line)) {
+          // This indicates remote error in "hg outgoing".
+          continue;
+        }
+
         list($name, $value) = explode(':', $line, 2);
         $value = trim($value);
         switch ($name) {