Homec4science

Improve exception behavior for Herald commit rules which fail to load diff…

Authored by epriestley <git@epriestley.com> on Oct 23 2013, 17:28.

Description

Improve exception behavior for Herald commit rules which fail to load diff context

Summary:
This code is a little funky right now, and can return array("error message") and then try to call getHunks() on it. Additionally, each field loads the commit's changes separately.

Instead, load the commit's changes once and cache them, and handle exceptions appropriately.

Test Plan:

  • Created a rule like "changed, added, removed content all match /.*/" to force all fields to generate.
  • Ran it successfully.
  • Faked an error and ran it, got reasonable results.

Reviewers: btrahan

Reviewed By: btrahan

CC: bigo, aran

Differential Revision: https://secure.phabricator.com/D7384

Details

Committed
epriestley <git@epriestley.com>Oct 23 2013, 17:28
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb5a009337f8e: Harbormaster v(-2)
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH2c3d071a26a9: Improve exception behavior for Herald commit rules which fail to load diff… (authored by epriestley <git@epriestley.com>).Oct 23 2013, 17:28