1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-09 00:12:40 +01:00
Commit graph

6 commits

Author SHA1 Message Date
epriestley
4b8a32ee02 Give Mercurial more plausible marker behavior
Summary: Ref T13546. Fixes some issues where marker selection in Mercurial didn't work, and selects "draft()" as the set of commits to show, which is at least somewhat reasonable.

Test Plan: Ran "arc branches" and "arc bookmarks" in Mercurial, got more reasonable output.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21380
2020-06-30 15:50:07 -07:00
epriestley
8c95dc0d29 Support date-range commit graph queries, and multiple disjoint commits in Git
Summary: Ref T13546. Allow the commit graph to be queried by date range, and Git to be queried for multiple disjoint commits.

Test Plan: Ran "arc branches" and future code which searches for alternate commit ranges for revisions.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21379
2020-06-30 15:50:06 -07:00
epriestley
0ad3222d59 Improve grid layout in "arc branches" at various terminal widths
Summary: Ref T13546. Make "arc branches" use a flexible grid width and try to match the content to the display width in a reasonable way.

Test Plan: Ran "arc branches" at various terminal widths, got generally sensible output.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21365
2020-06-30 15:50:06 -07:00
epriestley
cd19216ea2 Render "arc markers" workflows as a tree, not a list
Summary:
Ref T13546. Currently, each "land" workflow executes custom graph queries to find commits: move toward abstracting this logic.

The "land" workflow also has a potentially dangerous behavior: if you have "master > A > B > C" and "arc land C", it will land A, B, and C. However, an updated version of A or B may exist elsewhere in the working copy. If it does, "arc land" will incorrectly land an out-of-date set of changes.

To find newer versions of "A" and "B", we need to search backwards from all local markers to the nearest outgoing marker, then compare the sets of changes we find to the sets of changes selected by "arc land".

This is also roughly the workflow that "arc branches", etc., need to show local markers as a tree, and starting in "arc branches" allows the process to be visualized.

As implemented here ,this rendering is still somewhat rough, and the selection of "outgoing markers" isn't good. In Mercurial, we may plausibly be able to use phase markers, but in Git we likely can't guess the right behavior automatically and probably need additional configuration.

Test Plan: Ran "arc branches" and "arc bookmarks" in Git and Mercurial.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21363
2020-06-30 15:50:05 -07:00
epriestley
5abf0b96c8 Use MarkerRefs to resolve landing symbols in Mercurial
Summary: Ref T13546. Update the Mercurial code which finds default targets and maps symbols to targets under "arc land" to use the new MarkerRef workflow.

Test Plan: Ran "arc land" with (and without) various arguments in Mercurial, saw them resolve in a seemingly sensible way.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21335
2020-06-08 16:27:24 -07:00
epriestley
599ba0f999 Provide a more powerful query mechanism for "markers" (branches/bookmarks)
Summary:
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.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21333
2020-06-08 16:27:20 -07:00