Page MenuHomePhabricator

support phids in repository.query
Changes PlannedPublic

Authored by cburroughs on Aug 18 2014, 6:04 PM.
Tags
None
Referenced Files
F14013630: D10289.id30802.diff
Sat, Nov 2, 8:08 AM
F14003729: D10289.diff
Sat, Oct 26, 9:59 AM
F14002005: D10289.id24777.diff
Fri, Oct 25, 2:11 PM
F13974906: D10289.id30802.diff
Fri, Oct 18, 7:54 AM
F13956860: D10289.id25777.diff
Mon, Oct 14, 7:20 AM
Unknown Object (File)
Sep 22 2024, 1:15 AM
Unknown Object (File)
Sep 21 2024, 2:13 AM
Unknown Object (File)
Sep 9 2024, 12:52 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 Passed
Unit
Tests Passed
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.
cburroughs updated this object.
cburroughs edited the test plan for this revision. (Show Details)
cburroughs edited edge metadata.
  • new arc lint fixes
epriestley added a reviewer: epriestley.

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

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.