Page MenuHomePhabricator

[land-bot] Give a reasonable error when a revision cannot be found
ClosedPublic

Authored by jasonbcox on Fri, Oct 16, 17:52.

Details

Summary

Attempting to land-via-bot on a branch/commit with no revision results
in a not-useful error message. This patch ensures a comprehensible message is
provided instead.

Depends on D7959

Test Plan

On clean master, author a commit and then cherry-pick this patch. The following
commands should give reasonable error messages:

arc land-via-bot --preview HEAD~
arc land-via-bot --hold HEAD~

On clean master:

git checkout <this-patch> arcanist/workflow/ArcanistLandBotWorkflow.php
git commit -m "Test commit with no revision information"

The following commands should give reasonable error messages:

arc land-via-bot --preview
arc land-via-bot --hold

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.