]> khamidou — GitHub mirrors - arcanist.git/commit
Rebuild "arc branch" on new "hardpoint" infrastructure
authorepriestley <git@epriestley.com>
Sun, 13 Nov 2016 20:41:42 +0000 (12:41 -0800)
committerepriestley <git@epriestley.com>
Wed, 23 Nov 2016 15:36:43 +0000 (07:36 -0800)
commit71473af895f92482c95be2b7c87c43f1d2d8c976
tree80ad4cfe0b7f7334c41943f8efef160b407bc93d
parent45c2152988136b9476b12f805643b3e07da18552
Rebuild "arc branch" on new "hardpoint" infrastructure

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.

Reviewers: avivey, chad

Reviewed By: chad

Maniphest Tasks: T10895, T11518, T11355

Differential Revision: https://secure.phabricator.com/D16857
21 files changed:
src/__phutil_library_map__.php
src/conduit/ArcanistConduitEngine.php
src/loader/ArcanistGitHardpointLoader.php [new file with mode: 0644]
src/loader/ArcanistGitRevisionHardpointLoader.php [new file with mode: 0644]
src/loader/ArcanistHardpointLoader.php [new file with mode: 0644]
src/loader/ArcanistMercurialBranchCommitHardpointLoader.php [new file with mode: 0644]
src/loader/ArcanistMercurialHardpointLoader.php [new file with mode: 0644]
src/loader/ArcanistMercurialWorkingCopyCommitHardpointLoader.php [new file with mode: 0644]
src/loader/ArcanistMessageRevisionHardpointLoader.php [new file with mode: 0644]
src/ref/ArcanistBranchRef.php [new file with mode: 0644]
src/ref/ArcanistCommitRef.php [new file with mode: 0644]
src/ref/ArcanistRef.php [new file with mode: 0644]
src/ref/ArcanistRefQuery.php [new file with mode: 0644]
src/ref/ArcanistRevisionRef.php [new file with mode: 0644]
src/ref/ArcanistRevisionRefSource.php [new file with mode: 0644]
src/ref/ArcanistWorkingCopyStateRef.php [new file with mode: 0644]
src/repository/api/ArcanistGitAPI.php
src/repository/api/ArcanistMercurialAPI.php
src/repository/api/ArcanistRepositoryAPI.php
src/workflow/ArcanistFeatureWorkflow.php
src/workflow/ArcanistWorkflow.php