phacility/phabricator · error · PhutilArgumentUsageException

You can not both "--enable" and "--disable" the lock log.

Error message

You can not both "--enable" and "--disable" the lock log.

What it means

Error "You can not both "--enable" and "--disable" the lock log." thrown in phacility/phabricator.

Source

Thrown at src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php:33

          ),
          array(
            'name' => 'disable',
            'help' => pht('Disable the lock log.'),
          ),
          array(
            'name' => 'name',
            'param' => 'name',
            'help' => pht('Review logs for a specific lock.'),
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $is_enable = $args->getArg('enable');
    $is_disable = $args->getArg('disable');

    if ($is_enable && $is_disable) {
      throw new PhutilArgumentUsageException(
        pht(
          'You can not both "--enable" and "--disable" the lock log.'));
    }

    $with_name = $args->getArg('name');

    if ($is_enable || $is_disable) {
      if (strlen($with_name)) {
        throw new PhutilArgumentUsageException(
          pht(
            'You can not both "--enable" or "--disable" with search '.
            'parameters like "--name".'));
      }

      $gc = new PhabricatorDaemonLockLogGarbageCollector();
      $is_enabled = (bool)$gc->getRetentionPolicy();

      $config_key = 'phd.garbage-collection';

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php:33 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/165df5ebd5cd99c6. Report an issue: GitHub.