This is an automatically generated e-mail. To reply, visit:

(Updated May 26, 2015, 8:47 p.m.)

Review request for mesos, Benjamin Hindman and Joris Van Remoortere.


Removed `printUsage()` in favor of an "enhanced" `usage(Option<string> message)`
Fixed other code style violations.
Updated the tests accordingly.

This CL by itself compiles, but (as before) won't pass tests - r/34195 
addresses that and `make check` passes

Summary (updated)

Refactored common functionality into FlagsBase

Bugs: MESOS-2711

Repository: mesos

Description (updated)

Jira: MESOS-2711

Every program that uses stout's `FlagsBase` ends up
re-implementing the `printUsage()` function, and adding
a `bool help` (and associated --help flag); this functionality
has now been refactored in the base class and is available everywhere.

This change attempts to be backward-compatible, so it
does not alter the behavior of the program when --help is
invoked (by, eg, automatically printing usage and exiting)
but leaves up to the caller to check for `flags.help` and then
decide what action to take.

There is now a default behavior for the "leader" ("Usage: <prog name> 
but the client API allows to modify that too.

Note - anywhere I found the use of the `--help` flag the behavior was the same: 
print usage and exit (see also https://reviews.apache.org/r/34195).

Diffs (updated)


Diff: https://reviews.apache.org/r/34193/diff/


make check

**NOTE** this change by itself breaks the build, because the --help is 
redefined everywhere (16 places, as of last count): CL 34195 fixes that and 
makes all build/tests pass.


Marco Massenzio

Reply via email to