Page MenuHomePhabricator

support phids in repository.query
Changes PlannedPublic

Authored by cburroughs on Aug 18 2014, 6:04 PM.

Details

Summary

Return project phids when making repository.query calls. This allows
conduit clients to access the repo<-->project mapping. Also allow
querying by project phids for symmetry.

Calling needProjectPHIDs on every needProjectPHIDs may make them more
expensive but this method is already marked as unstable and adding
some new repoistory.query.withprojects method sounds ugly and
complicated.

Test Plan
  • Use a phabricator instance where some repos have projects
  • Query for a repo by callsign, observe projects array has something that looks like a phid
  • Query project.query with the phid to make sure it's something valid
  • Query for a repo by project, should return only repos with that project
  • Query for a repo with no projects, observe a nice empty projects array.

Diff Detail

Repository
rP Phabricator
Branch
conduit-repo-project
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 6789
Build 6811: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

cburroughs retitled this revision from to support phids in repository.query.Aug 18 2014, 6:04 PM
cburroughs updated this object.
cburroughs edited the test plan for this revision. (Show Details)
cburroughs updated this revision to Diff 24777.
cburroughs edited edge metadata.Oct 22 2014, 3:43 PM
cburroughs updated this revision to Diff 25777.
  • new arc lint fixes
epriestley requested changes to this revision.

This should wait for T7715 and rebuild on top of ApplicationSearch-based Conduit query methods.

This revision now requires changes to proceed.May 17 2015, 2:44 PM
cburroughs edited edge metadata.Jun 15 2015, 7:51 PM
cburroughs updated this revision to Diff 32177.
  • rebase
cburroughs planned changes to this revision.Jun 15 2015, 7:52 PM

Just keeping patch stack up to date.

dereckson added inline comments.
src/applications/repository/storage/PhabricatorRepository.php
144

This won't work when the public toDictionary() method is called without needProjectsPHIDs(true) before.