Reimplement pants help.

Review Request #296 — Created April 29, 2014 and submitted

Previously there were several different help paths,
help messages weren't uniform and in some cases were messy.

This change:

- Gets rid of the 'help' command.
- Gets rid of the 'help' goal.
- Has a single entry point to help message printing.
- Cleans up help messages. For example, we no longer print
  the list of goals unless you explicitly ask for it,
  because that list is long now.

Note that this gets rid of help for non-goal commands, but
those are going away soon anyway.

This change is in preparation for getting us off optparse and
onto our own custom cmd-line parser. We no longer use optparse's
help messages (but we do still use optparse as an implementation
detail for formatting flag help, for now).
./pants tests/python/pants_test:all

./pants help
./pants -h
./pants --help
./pants goal
./pants goal help
./pants goal -h
./pants goal --help
./pants goal help compile
./pants goal compile -h
  1. LGTM save for 2 issues:
    1.) afaict there is no way to discover the top level commands any longer.
    2.) its arguably a regression to lose the global flags in the goal specific help
    I know you're trying to kill the commands so 1 is tied up in this.
    1. 1) Correct - this is by design, since those are going away soon anyway. But I think this has been broken for a while anyway:
      fozzie:[~/src/pants][master]$ ./pants
      Pants 0.0.11 @ PANTS_BUILD_ROOT: /Users/benjy/src/pants
      Available subcommands:
      Friendly docs:
      2) I thought it looked better, and made the output more succinct and less repetitive. It's pretty obvious how to get info on global flags. 
      How strongly do you feel about this? How about we revisit after my flags re-implementation? That's going to require a lot of thought about flag scope anyway.
    2. I don't feel super strongly, there is just sooo much flag output by default the succinct argument doesn't hold much water.  I'm happy to roll with this though.  In reality - by direct support evidence - no one actually uses help and reads this stuff :/
  2. src/python/pants/commands/ (Diff revision 1)
    I think this method can die now...
  3. src/python/pants/commands/ (Diff revision 1)
    ...and then you can inline this.
  1. Ship It!
Review request changed

Status: Closed (submitted)