Page MenuHomePhabricator

Rebuild "arc branch" on new "hardpoint" infrastructure
ClosedPublic

Authored by epriestley on Nov 14 2016, 10:16 PM.
Tags
None
Referenced Files
F14015254: D16857.diff
Sun, Nov 3, 4:24 PM
F13956861: D16857.diff
Mon, Oct 14, 7:20 AM
F13956741: D16857.id.diff
Mon, Oct 14, 6:56 AM
F13956735: D16857.id40590.diff
Mon, Oct 14, 6:55 AM
F13956715: D16857.id40737.diff
Mon, Oct 14, 6:51 AM
F13956697: D16857.id40745.diff
Mon, Oct 14, 6:46 AM
Unknown Object (File)
Fri, Oct 11, 6:22 AM
Unknown Object (File)
Mon, Oct 7, 7:49 PM
Subscribers
None
Tokens
"Party Time" token, awarded by yelirekim.

Details

Summary

Ref T11355. Ref T10895. Ref T11518. This is heading to experiemntal. This may or may not be a good idea, but basically it's a more generic version of Query classes in Phabricator.

This starts creating generic objects ("CommitRef", "BranchRef") which have attachable properties, like many Phabricator objects do. Here, they're formalized (and theoretically extensible), as "hardpoints".

So: a hardpoint is something on an object which you can attach stuff to, but which we don't start with the data for.

All of the logic for actually figuruing out how to attach stuff to hardpoints is also modular. Loader classes have code for loading stuff onto objects. For example, ArcanistMercurialBranchCommitHardpointLoader knows how to run hg log to build the commit for a branch.

One issue is that arc feature in Mercurial is 100% bookmarks, so maybe I should actually be making ArcanistRefRef here. But we can probbbably deal with that later.

This moves us somewhat closer to T11355 and T11518, although the immediate thing I want to do with it is define an ArcanistObjectNameRef and use hardpoints to load URIs for it for T10895.

Overall, I expect this will see some revision in future changes, and perhaps most of it will go away.

Test Plan

Ran arc branch / arc feature in Git and Mercurial repositories.

Diff Detail

Repository
rARC Arcanist
Branch
rlook1
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/ref/ArcanistWorkingCopyStateRef.php:7XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 14484
Build 18882: Run Core Tests
Build 18881: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Rebuild "arc branch" on new "hardpoint" infrastructure.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)

Not sold on this being any good yet.

src/workflow/ArcanistFeatureWorkflow.php
179

This is like 1K lines of code but I was able to remove one instanceof so that's progress right?

chad edited edge metadata.
This revision is now accepted and ready to land.Nov 23 2016, 1:40 AM
This revision was automatically updated to reflect the committed changes.