1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00
Summary: Not required after D2730.

Test Plan: `arc diff` with invalid reviewer in commit message.

Reviewers: nh

Reviewed By: nh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2733
This commit is contained in:
vrana 2012-06-12 16:35:39 -07:00
parent 3718e49f9c
commit 371419344a
4 changed files with 3 additions and 16 deletions

View file

@ -69,12 +69,11 @@ final class ConduitAPI_differential_parsecommitmessage_Method
$field = $aux_fields[$field_key];
try {
$fields[$field_key] = $field->parseValueFromCommitMessage($field_value);
$field->setValueFromParsedCommitMessage($fields[$field_key]);
} catch (DifferentialFieldParseException $ex) {
$field_label = $field->renderLabelForCommitMessage();
$errors[] = "Error parsing field '{$field_label}': ".$ex->getMessage();
$fields[$field_key] = $ex->getPartialParse();
}
$field->setValueFromParsedCommitMessage($fields[$field_key]);
}
if (!$is_partial) {

View file

@ -18,14 +18,4 @@
final class DifferentialFieldParseException extends Exception {
private $partialParse;
public function __construct($message, $partial_parse = null) {
parent::__construct($message);
$this->partialParse = $partial_parse;
}
public function getPartialParse() {
return $this->partialParse;
}
}

View file

@ -768,8 +768,7 @@ abstract class DifferentialFieldSpecification {
? "users and mailing lists"
: "users";
throw new DifferentialFieldParseException(
"Commit message references nonexistent {$what}: {$invalid}.",
array_unique($results));
"Commit message references nonexistent {$what}: {$invalid}.");
}
return array_unique($results);

View file

@ -149,8 +149,7 @@ final class DifferentialManiphestTasksFieldSpecification
}
$invalid = implode(', ', $invalid);
throw new DifferentialFieldParseException(
"Commit message references nonexistent {$what}: {$invalid}.",
$task_phids);
"Commit message references nonexistent {$what}: {$invalid}.");
}
return $task_phids;