HomePhabricator

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

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

Provenance
epriestleyAuthored on Oct 23 2013, 3:28 PM
Reviewer
btrahan
Differential Revision
D7384: Improve exception behavior for Herald commit rules which fail to load diff context
Parents
rPb5a009337f8e: Harbormaster v(-2)
Branches
Unknown
Tags
Unknown

Event Timeline