Page MenuHomePhabricator

Provide a `./bin/lookup` script
Closed, WontfixPublic

Description

It is sometimes difficult to work out what object a PHID is referring to. For me, it usually involves querying the database. It would be useful if there was a ./bin/lookup script which could be used to query objects based on their PHID (or some other identifier).

An example of how I imagine this would be used:

> ./bin/lookup PHID-REPO-ffrhepqxcgyorisvabky
Repository rX

> ./bin/lookup PHID-CMIT-sr6zv7bzzfyql4vfn6cv
Commit rXcfb048ca2d5fab185f56b316c86f792b1a4ce08d.

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Phabricator.
joshuaspence added a subscriber: joshuaspence.

As a partial approach (which has the advantage of not requiring access to the box), you should be able to plug these into the global search field to navigate to them.

joshuaspence triaged this task as Wishlist priority.Jun 20 2014, 4:34 PM
joshuaspence renamed this task from Provide a `./bin/lookup` script. to Provide a `./bin/lookup` script.Jul 10 2014, 7:01 PM
epriestley claimed this task.

Although I don't think this is necessarily a bad idea, I haven't seen too much of a need for this. Some alternatives:

  • Plug the PHID into global search (I think this is what I usually do?).
  • You could probably write a little script on top of arc call-conduit phid.lookup.
  • If you're feeling adventuresome, you can bin/remove destroy <phid> for most PHIDs and see what it is from the prompt, then ^C it.

We might still write this eventually, but I'd like a better sense of what sort of situations it's useful in -- maybe we can do a better job with other tools.

(Very very long ago, I think we had a web application with some PHID utility stuff -- I think it mostly got removed for security reasons, but it also wasn't used very much.)