Page MenuHomePhabricator

Provide a more powerful query mechanism for "markers" (branches/bookmarks)

Authored by epriestley on Jun 8 2020, 5:30 PM.



Ref T13546. Various Arcanist workflows, and particularly the MercurialAPI, currently repeat quite a lot of code around parsing branches and bookmarks.

In modern Mercurial, we can generally use the "head()" and "bookmark()" revsets to do this fairly sensibly.

This change mostly adds more code (and introduces "arc bookmarks" and "arc branches" as replacements for "arc bookmark" and "arc branch") but followups should be able to mostly delete code.

Test Plan

Ran "arc branches" and "arc bookmarks" in Git and Mercurial.

Diff Detail

rARC Arcanist
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jun 8 2020, 5:30 PM
epriestley requested review of this revision.Jun 8 2020, 5:30 PM
epriestley updated this revision to Diff 50764.Jun 8 2020, 5:38 PM
  • Improve Mercurial behavior for figuring out which branch head is active.
This revision was not accepted when it landed; it landed in state Needs Review.Jun 8 2020, 11:27 PM
This revision was automatically updated to reflect the committed changes.