sapling/lib/cliparser
Jun Wu 957e54d9c1 dispatch: support Rust subcommands
Summary:
Simple subcommand support for Rust. A command name like `foo-bar` will be run
if the user types `foo-bar`, `foo bar`, or `foo --bar`. I'm thinking about
some subcommands about blackbox to show logs in different ways.

I also want to move special cases of existing commands that are incompatible
with the main job of the command, to seprate commands.  For example:

  hg amend --fixup               (incompatible with most amend flags)
  hg amend --stack               (incompatible with most amend flags)
  hg diff --since-last-arc-diff  (incompatible with -r, -c)
  hg diff --since-last-submit-2o (incompatible with -r, -c)
  hg diff --since-last-submit    (incompatible with -r, -c)
  hg hide --cleanup              (incompatible with -r, -c)
  hg rebase --restack            (incompatible with most rebase flags)

So this change is one step towards that - we can move `amend --fixup` logic to
a separate `amend-fixup` command. Note: `amend` accepts file names, so we'll
need a way to avoid `amend fixup` matching `amend-fixup`.

Reviewed By: sfilipco

Differential Revision: D17645282

fbshipit-source-id: a5928329a8bcc9d0f68741f3fda14e0ec4c68304
2019-10-24 13:40:20 -07:00
..
src dispatch: support Rust subcommands 2019-10-24 13:40:20 -07:00
Cargo.toml cliparser: stop using vendored shlex 2019-08-08 22:54:08 -07:00