1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-29 10:12:41 +01:00
phorge-arcanist/src/repository/api
epriestley 0b3cd39230 Update the "WorkingCopy" API and create a fallback "Filesystem" working copy
Summary:
Ref T11968.

  - Allow "WorkingCopy" objects to maintain an API object and update callers ("get...()" instead of "new...()").
  - Always generate a WorkingCopy object and a RepositoryAPI object.

Currently, code has to look like this:

```
$working_copy = ...
if ($working_copy) {
  $repository_api = ...
  if ($repository_api [instanceof ... ]) {
```

This is clunky. There's also no reason some "arc" commands can't run outside a VCS working directory without special-casing how they interact with the filesystem.

Conceptually, model the filesystem as a trivial VCS (which stores exactly one commit, always amends onto it, and discards history). Provide a trivial WorkingCopy and API for it.

(This change isn't terribly interesting on its own, but chips away at landing the new Hardpoint infrastructure.)

Test Plan: Ran `arc version`, `arc upgrade`.

Maniphest Tasks: T11968

Differential Revision: https://secure.phabricator.com/D21070
2020-04-08 09:22:43 -07:00
..
__tests__ Correctly parse git status --porcelain=2 output with filenames with spaces 2018-04-19 19:17:16 -07:00
ArcanistFilesystemAPI.php Update the "WorkingCopy" API and create a fallback "Filesystem" working copy 2020-04-08 09:22:43 -07:00
ArcanistGitAPI.php Update some ancient "set X=Y" environment code for new Windows execution without a shell 2020-04-02 13:50:57 -07:00
ArcanistGitUpstreamPath.php After pushing at the end of "arc land", cascade the origin through all local tracking branches 2015-10-28 14:01:35 -07:00
ArcanistMercurialAPI.php Update some ancient "set X=Y" environment code for new Windows execution without a shell 2020-04-02 13:50:57 -07:00
ArcanistRepositoryAPI.php Update some ancient "set X=Y" environment code for new Windows execution without a shell 2020-04-02 13:50:57 -07:00
ArcanistSubversionAPI.php Update some ancient "set X=Y" environment code for new Windows execution without a shell 2020-04-02 13:50:57 -07:00