Page MenuHomePhabricator

Allow `arc` to identify repositories without "project_id"
ClosedPublic

Authored by epriestley on Jan 26 2014, 7:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 9:22 PM
Unknown Object (File)
Jan 19 2024, 7:40 PM
Unknown Object (File)
Jan 12 2024, 5:01 PM
Unknown Object (File)
Jan 9 2024, 6:44 AM
Unknown Object (File)
Dec 27 2023, 1:54 PM
Unknown Object (File)
Dec 22 2023, 3:52 AM
Unknown Object (File)
Dec 20 2023, 7:58 PM
Unknown Object (File)
Dec 1 2023, 8:08 PM
Subscribers

Details

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.

Diff Detail

Repository
rARC Arcanist
Branch
repoquery
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

epriestley updated this revision to Unknown Object (????).Jan 26 2014, 8:30 PM
  • Remove a small piece of debugging code.
btrahan added inline comments.
src/workflow/ArcanistDiffWorkflow.php
2296–2299

word

(If anyone does hit that, it means they updated between Saturday evening and Sunday afternoon, so they'll probably be accepting of "update again" as a solution.)

epriestley updated this revision to Unknown Object (????).Jan 26 2014, 11:31 PM
  • Removed "NOTE".

Looks like it works in production:

mysql> select id, repositoryPHID from differential_diff order by id desc limit 2;
+-------+--------------------------------+
| id    | repositoryPHID                 |
+-------+--------------------------------+
| 18272 | PHID-REPO-7549473b706cf5093dbf |
| 18271 | NULL                           |
+-------+--------------------------------+
2 rows in set (0.00 sec)

Oh, and for the record, this...

Fix a unit test which broke a while ago when we fixed a rare definition of "unstaged".

...turned out to be some weird git version thing, actual fix was update Git.