`buck query` for paths and deps backed by neo4j.

Summary:
Added a `buck query` command to query for all the dependencies of a target, or for all the
dependency paths from a target back to a source. The syntax is `T -?> S`
where `T` is the target, `?` is the search depth, and `S` is the source. Leaving `S` blank will
query for dependencies rather than paths. `?` can be a number or `*` for unlimited depth, and
an empty `?` defaults to depth `*`.

For example, buck query '//:android-binary ->' searches for all immediate dependencies of
//:android-binary.

Each time the command is run, a neo4j instance is spun up and the dependency graph information
is fed to neo4j. Then we construct a breadth-first traverser to crawl the graph depending
on the query. Adding more sophisticated queries should be straightforward given the neo4j
traversal API.

Test Plan:
Run the unit tests in `ant test`, which includes a new QueryCommandTest to test the new command.
26 files changed
tree: ae358e86a79d62e5d7b586b783f03b78aa7b06c2
  1. .idea/
  2. bin/
  3. config/
  4. docs/
  5. lib/
  6. plugin/
  7. pmd/
  8. scripts/
  9. src/
  10. test/
  11. testdata/
  12. third-party/
  13. .buckconfig
  14. .classpath
  15. .gitignore
  16. .project
  17. buck.iml
  18. build.xml
  19. DEFS
  20. LICENSE
  21. README.md
README.md

Buck

Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.

Installation

To build Buck, run the following:

git clone git@github.com:facebook/buck.git
cd buck
ant
./bin/buck --help

License

Apache License 2.0