Homec4science

Use PhutilArgumentParser in Daemon overseer/executor

Authored by epriestley <git@epriestley.com> on Feb 3 2012, 00:43.

Description

Use PhutilArgumentParser in Daemon overseer/executor

Summary:

  • Add a 'repeatable' flag for argument specifications.
  • Add some code to detect and throw on invalid specs (e.g., parameter +

wildcard).

  • Fix a bug where 'help' would show param name twice even for arguments with

no short flag.

  • Rename 'printHelp()' to 'renderHelp()'.
  • Add 'printHelpAndExit()'.
  • Convert launch_daemon.php to use PhutilArgumentParser.
  • Convert exec_daemon.php to use PhutilArgumentParser.

Test Plan:

  • Ran unit tests.
  • Ran daemons directly (launch_daemon.php, exec_daemon.php) and via "phd" (phd

debug, phd launch, phd status, phd stop).

  • Ran utf8.php.

Reviewers: davidreuss, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1537

Details

Committed
epriestley <git@epriestley.com>Feb 3 2012, 00:43
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUbfc408aa0243: Provide a basic argument parser for libphutil
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUcd70f6537d38: Use PhutilArgumentParser in Daemon overseer/executor (authored by epriestley <git@epriestley.com>).Feb 3 2012, 00:43