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)
Sun, Nov 17, 8:10 PM
Unknown Object (File)
Fri, Nov 15, 10:11 AM
Unknown Object (File)
Mon, Nov 11, 10:04 PM
Unknown Object (File)
Mon, Nov 11, 12:18 AM
Unknown Object (File)
Sun, Nov 10, 12:31 PM
Unknown Object (File)
Sat, Nov 9, 9:48 PM
Unknown Object (File)
Thu, Nov 7, 3:51 AM
Unknown Object (File)
Mon, Nov 4, 7:12 AM
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

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.