]> khamidou — GitHub mirrors - arcanist.git/commit
Allow `arc` to identify repositories without "project_id"
authorepriestley <git@epriestley.com>
Sun, 26 Jan 2014 23:31:30 +0000 (15:31 -0800)
committerepriestley <git@epriestley.com>
Sun, 26 Jan 2014 23:31:30 +0000 (15:31 -0800)
commita7376624b4a2213048c4d7e66d208c81c714dee5
tree0290000781ffcca4c5ecce53b182d9d20662add8
parente4b1e8e6816599d2b8cce7a1bc228ed99d51c689
Allow `arc` to identify repositories without "project_id"

Summary:
Ref T4343. Continues the process of reducing the prominence of Arcanist Projects. Primarily:

  - Query Phabricator to identify the working copy based on explicit configuration, or guess based on heuristics.
  - Enhance `arc which` to explain the process to the user.
  - The `project_id` key is no longer required in `.arcconfig`.

Minor/cleanup changes:

  - Rename `project_id` to `project.name` (consistency, clarity).
  - Rename `conduit_uri` to `phabricator.uri` (consistency, clairty).
  - These both need documentation updates.
  - Add `repository.callsign` to explicitly bind to a repository.
  - Updated `.arcconfig` for the new values.
  - Fix a unit test which broke a while ago when we fixed a rare definition of "unstaged".
  - Make `getRepositoryUUID()` generic so we can get rid of one `instanceof`.

Test Plan:
  - Ran `arc which`.
  - Ran `arc diff`.
  - This doesn't really change anything, so the only real risk is version compatibility breaks. This //does// introduce such a break, but the window is very narrow: if you upgrade `arc` after this commit, and try to diff against a Phabricator which was updated after yesterday (D8068) but before D8072 lands, the lookup will work so we'll add `repositoryPHID` to the `differential.creatediff` call, but it won't exist in Phabricator yet. This window is so narrow that I'm not going to try to fix it, as I'd guess there is a significant chance that no users will be affected. I don't see a clever way to fix it that doesn't involve a lot of work, either.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T4343

Differential Revision: https://secure.phabricator.com/D8073
13 files changed:
.arcconfig
scripts/arcanist.php
src/__phutil_library_map__.php
src/configuration/ArcanistSettings.php
src/repository/api/ArcanistGitAPI.php
src/repository/api/ArcanistMercurialAPI.php
src/repository/api/ArcanistRepositoryAPI.php
src/repository/api/ArcanistSubversionAPI.php
src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php
src/workflow/ArcanistBaseWorkflow.php
src/workflow/ArcanistDiffWorkflow.php
src/workflow/ArcanistWhichWorkflow.php
src/workingcopyidentity/ArcanistWorkingCopyIdentity.php