Homec4science

Drive Differential commit message parsing through extensible fields

Authored by epriestley <git@epriestley.com> on Aug 18 2011, 21:08.

Description

Drive Differential commit message parsing through extensible fields

Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).

You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:

list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
  $data[$k] = (int)$v;
}
$data = array_unique($data);
break;

Otherwise I think this is clean.

Test Plan:

  • Called the conduit method with various commit messages, parsed fields/errors

seemed correct.

  • "arc diff"'d this diff onto localhost, then updated it.
  • "arc amend"'d this diff.

Reviewers: jungejason, tuomaspelkonen, aran

Reviewed By: jungejason

CC: aran, jungejason, epriestley

Differential Revision: 829

Details

Committed
epriestley <git@epriestley.com>Aug 19 2011, 04:49
Pushed
aubortJan 31 2017, 17:16
Parents
rPH735120b84271: Fix bug where CC value is ignored on intial parse from commit message
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH0be3db03eeb5: Drive Differential commit message parsing through extensible fields (authored by epriestley <git@epriestley.com>).Aug 19 2011, 04:49