Page MenuHomePhabricator

[land-bot] Queue the HEAD revision by default

Authored by jasonbcox on Wed, Oct 14, 19:15.


Group Reviewers
Restricted Project
rABCa6b0545ead7a: [land-bot] Queue the HEAD revision by default

The landbot workflow fails on stacked revisions unless --revision
is explicitly set. Users should expect it to work out of the box. This patch
picks the latest revision in the current branch by default, eliminating this
annoyance for small stacks.

While it might be more ideal to queue all revisions in the stack at once,
this requires some refactoring to get rid of the dependency on using arc land
as a child workflow. In theory, this patch also acts as the first step toward
eliminating that dependency, so we're likely moving in the right direction.

Test Plan

On a set of stacked revisions:

arc land-via-bot --hold

Pre-patch: The above fails, complaining about detecting multiple revisions.
Post-patch: The output indicates the latest revision is selected for landing.

Diff Detail

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