HomePhabricator

Provide a better error message when an invalid ID is given to arc patch

Authored by jcox on Feb 7 2017, 9:03 PM.

Description

Provide a better error message when an invalid ID is given to arc patch

Summary:
Fixes T8937. Previously when running arc patch D9999999999 or arc export --revision 99999999 with a non-existent diff or revision ID you would get a rather unhelpful error message. Now you'll get a slightly more helpful error message:

$ arc patch D99999999
Exception
Couldn't find a revision or diff that matches the given ID
(Run with `--trace` for a full exception trace.)

Test Plan: Ran arc patch with a valid revision and saw it patch successfully. Ran again with an invalid revision, saw the error message.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: Korvin, epriestley, yelirekim

Maniphest Tasks: T8937

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